Earn up to
$50000
for inviting friends
to get StartUp Bonus
from InstaForex
No investments required!
GET BONUS
55%
from InstaForex
on every deposit
  • Amazed
  • Amused
  • Angelic
  • Angry
  • Asleep
  • Bashul
  • Bitchy
  • Blah
  • Bored
  • Breezy
  • Brooding
  • Busy
  • Buzzed
  • Chatty
  • Cheeky
  • Cheerful
  • Cold
  • Confused
  • Cool
  • Crappy
  • Cynical
  • Daring
  • Dead
  • Devilish
  • Doh
  • Doubtful
  • Drunk
  • Fine
  • Flirty
  • Goofy
  • Grumpy
  • Happy
  • Hot
  • Hungover
  • Innocent
  • Inspired
  • In_Love
  • Lonely
  • Lurking
  • Mellow
  • Paranoid
  • Pensive
  • Psychedelic
  • Relaxed
  • Sad
  • Scared
  • Shocked
  • Sick
  • Sleepy
  • Sneaky
  • Stresses
  • Tired
  • Twisted
  • Worried
  • Yeehaw
  • Reply to thread
    Page 2 of 6 1 2 3 4 ...
    Results 11 to 20 of 58

    Thread: Learn how to create a simple Expert Advisor

    1. #11
      Forex in the blood
      I am:
      ----
       
      youssef_internet is on a distinguished road youssef_internet's Avatar
      Posts
      301
      Accumulated bonus
      59 USD (What is this?)
      Thanks
      3
      Thanked 16 Times in 12 Posts

      Default

      Quote Originally Posted by harvest     
      What is the strategy being used for this simple Expert Advisor?
      Maybe it will be a simple strategy too. Moving Averages?
      I dont decide yet witch strategy i will use, I going to use MA, Supports, Resistant....

      Just Fllow steps!


    2. #12
      MT5 Addict
      I am:
      Happy
       
      ahmedlinkers is on a distinguished road ahmedlinkers's Avatar
      Posts
      467
      Accumulated bonus
      98 USD (What is this?)
      Thanks
      3
      Thanked 15 Times in 11 Posts

      Default

      Quote Originally Posted by youssef_internet     
      Step 1: HowExpert advisor Work?

      Each Metadrader4 include an MQL4 editor (MetaQuotes Language editor) for MQL4 programming language, you can open it from metadrader 4 platforme using [(Tools-->MetaQuotes Language editor) or just press f4 ].

      Ok let us know how EA work :

      Open MQL editor using (f4) then (file-->new) choose (Expert Advisor) click (next) write the name of our expert advisor (ex:first_test) click (end).

      Now we have a new file its name is (first_test.mq4) here where we are going to put instructions (Programming) using MQL4 language, if the program is ready we compile it and then the MQL4 editor create an EA named (first_test.ex4) this what we are going to attach with the chart for execution not the fisrt one. the first one is only for programming!

      first_test.mq4 file divided at 3 part:
      1 - function : init() {...instructions....} : this function for initialise envirenment for AE, when we attach EA with a chart, init() function start to execute its instrutions (program).

      2 - function : deinit() {...instructions....} :The own function of the function deinit() is its execution at program termination (deinitialization). when we close the chart or exit from AE, deinit() function start to execute its instrutions (program).

      3- function : start() {...instructions....} :the function start() is called (and executed) immediately after a new tick comes. If a new tick has come during the execution of the special function start(), this tick will be ignored.(So what is tick?)


      Tick is an event that is characterized by a new price of the symbol at some instant.ex:the price of eurusd changed form 1.4300 to 1.4299 this infrmation is a new tick sent by the Broker server)

      Broker server ----send new ticks to--->Metatrader4 (EA read each new tick and execute start() function's instructions (program).

      -----------------------------------------------------------
      Next Step (step 2 : create an AE to understand what we learn from step 1)

      any questions?
      That looks simple , and hopefully it ll work also. I ll give that a try and let my friend know the result. I aappreciate the contribution of my friend. Happy trading to all.


    3. #13
      Forex in the blood
      I am:
      ----
       
      youssef_internet is on a distinguished road youssef_internet's Avatar
      Posts
      301
      Accumulated bonus
      59 USD (What is this?)
      Thanks
      3
      Thanked 16 Times in 12 Posts

      Default

      Quote Originally Posted by ahmedlinkers     
      That looks simple , and hopefully it ll work also. I ll give that a try and let my friend know the result. I aappreciate the contribution of my friend. Happy trading to all.
      Thank you Mr ahmedlinkers
      why do you attach the first steps with your post, didn't you see the step number 2? it is avalable here https://forum.mt5.com/showthread.php...Expert-Advisor post number 10!!


    4. #14
      MT5 Maniac
      I am:
      Inspired
       
      seven_razor will become famous soon enough seven_razor will become famous soon enough seven_razor's Avatar
      Posts
      3,444
      Accumulated bonus
      1085 USD (What is this?)
      Thanks
      36
      Thanked 123 Times in 83 Posts

      Default

      Thanks for sharing. Good work.
      But it's only first step lol, I'm waiting for the syntax and logic part.


    5. #15
      MT5 Addict
      I am:
      Happy
       
      shehryar713 is on a distinguished road shehryar713's Avatar
      Posts
      411
      Accumulated bonus
      74 USD (What is this?)
      Thanks
      5
      Thanked 20 Times in 8 Posts

      Default

      Quote Originally Posted by seven_razor     
      Thanks for sharing. Good work.
      But it's only first step lol, I'm waiting for the syntax and logic part.
      so for so good and easy to understand can't wait to get more lessons very soon


    6. #16
      Forex in the blood
      I am:
      ----
       
      youssef_internet is on a distinguished road youssef_internet's Avatar
      Posts
      301
      Accumulated bonus
      59 USD (What is this?)
      Thanks
      3
      Thanked 16 Times in 12 Posts

      Default

      Quote Originally Posted by seven_razor     
      Thanks for sharing. Good work.
      But it's only first step lol, I'm waiting for the syntax and logic part.
      Quote Originally Posted by shehryar713     
      so for so good and easy to understand can't wait to get more lessons very soon
      I teach you how to create an EA using my personal method that will be easy to understand. Till now I posted 2 parts and I consider them like an introduction!
      SO just flow!!


    7. #17
      Forex in the blood
      I am:
      ----
       
      youssef_internet is on a distinguished road youssef_internet's Avatar
      Posts
      301
      Accumulated bonus
      59 USD (What is this?)
      Thanks
      3
      Thanked 16 Times in 12 Posts

      Default

      Start learning MQL4 language part 1

      To understand how start() function work, we are going to create a program that give us for each tick received an alert inform us about the price for the current symbol(pair ex:eurusd):
      //---------------------------------------------------------------------------
      int Count=0;
      int start()
      {
      double Price = Bid;
      Count++;
      Alert("New tick ",Count," Price = ",Price);
      return;
      }
      //----------------------------------------------------------------------------
      Explication:
      int count=0 :
      count is a variable we create it when we need it, we can create lot of it, depend to our needs.

      int is the type of the variable it means integer(-2.000.000.000 < count < +2.000.000.000), we are going to see each type when we need it at another example.

      double Price = Bid; :
      double type of variable used often for Price(Price the variable that we created -1.7e-308 < price < +1.7 e308).
      Bid given by the system is the current price for the current pair.

      count++ it means new count= old count + 1.

      Alert to show the tick number and the price

      return; exit from start function and wait for the next tick.


      Compile the program and test it


      See you at the next part(Start learning MQL4 language part 2)



      any questions


    8. #18
      Where am I?
      I am:
      ----
       
      holako is on a distinguished road holako's Avatar
      Posts
      4
      Accumulated bonus
      2 USD (What is this?)
      Thanks
      1
      Thanked 0 Times in 0 Posts

      Default

      Why did you banned this member he is very active and he help us!!!!!!!!!!!


    9. #19
      MT5 GURU
      I am:
      Cheerful
       
      forexsage is just really nice forexsage is just really nice forexsage is just really nice forexsage is just really nice forexsage's Avatar
      Posts
      1,735
      Accumulated bonus
      1477 USD (What is this?)
      Thanks
      93
      Thanked 379 Times in 151 Posts

      Default

      Quote Originally Posted by holako     
      Why did you banned this member he is very active and he help us!!!!!!!!!!!
      Hello. I am forexsage, he was banned because he was spamming forum and bonus hunting. I know he has some nice posts but when you disregard warnings (he was warned) and kept on spamming the forum he had to be banned. Normally I am the 'good cop' I rarely ban anyone, but we work very hard to keep this forum safe from spammers and so forth... if you have any questions on EAs feel free to ask them on this thread, I am a guru and I am here to assist you as well.

      Happy trading

      forexsage


    10. #20
      Banned
      I am:
      Cheerful
       
      first4all011 is on a distinguished road first4all011's Avatar
      Posts
      871
      Accumulated bonus
      873 USD (What is this?)
      Thanks
      25
      Thanked 14 Times in 14 Posts

      Default

      Hello forexsage, I've little bit interest on making an EA according to my favorite indicators. How can I do that easily? I'm seeking an easy going system to do that because I don't have enough knowledge on programming language. Hope you'll understand what I'm saying here. Happy winning always!!!


    Reply to thread
    Page 2 of 6 1 2 3 4 ...

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts