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 1 of 6 1 2 3 ...
    Results 1 to 10 of 58

    Thread: Learn how to create a simple Expert Advisor

    1. #1
      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 Learn how to create a simple Expert Advisor

      Welcome to this thread!

      Here I will Post how to create your Personal expert Advisor step by step.

      Everyday I will post a chapiter and answers of your questins...

      The cours will start 25/06/2011

      Good luck
      Last edited by youssef_internet; 06-24-2011 at 10:20 PM.


    2. The following 10 users say Thank You to youssef_internet for this useful post.

      FlyingShark (07-18-2015), kobi_saheb (11-01-2012), moneygrows (10-21-2012), Unregistered (7)

    3. #2
      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

      where is the step?
      Now is June, 25, 2011 lol.
      I will wait for your step.


    4. The following 7 users say Thank You to seven_razor for this useful post.

      Unregistered (7)

    5. #3
      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

      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?
      Last edited by youssef_internet; 06-25-2011 at 02:13 PM.


    6. The Following User Says Thank You to youssef_internet For This Useful Post:

      -FxAsia- (09-26-2012)

    7. #4
      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     
      where is the step?
      Now is June, 25, 2011 lol.
      I will wait for your step.
      Sorry for the delay and thank you for your attention
      But it's still June, 25, 2011!


    8. #5
      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

      thank you for starting this thread i will closely follow your instructions and eager to use a custom indicator to use with in this set of instructions so that i can implement my strategy with my EA


    9. #6
      Banned
      I am:
      Cheerful
       
      chidi has a spectacular aura about chidi has a spectacular aura about chidi's Avatar
      Posts
      6,803
      Accumulated bonus
      1526 USD (What is this?)
      Thanks
      66
      Thanked 179 Times in 130 Posts

      Default

      Since i`m not yet an expert in forex trading, i want to know whether an expert advisor that i can make will be a good one that will make profits for me or should i use only the ones that i see online.


    10. #7
      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 shehryar713     
      thank you for starting this thread i will closely follow your instructions and eager to use a custom indicator to use with in this set of instructions so that i can implement my strategy with my EA
      After this thread I will start another one to teach you how to create a Custom Indicator.
      So just fllow steps!


    11. #8
      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 chidi     
      Since i`m not yet an expert in forex trading, i want to know whether an expert advisor that i can make will be a good one that will make profits for me or should i use only the ones that i see online.
      Hi chidi
      here you are going to learn how to create a simple EA, then you can improve your level... because the basic it is the important thing.

      To create a good EA you have to learn and know good strategies!

      Good luck


    12. #9
      FX Zombie
      I am:
      Amused
       
      harvest will become famous soon enough harvest's Avatar
      Posts
      2,763
      Accumulated bonus
      531 USD (What is this?)
      Thanks
      62
      Thanked 80 Times in 67 Posts

      Default

      Quote Originally Posted by youssef_internet     
      Hi chidi
      here you are going to learn how to create a simple EA, then you can improve your level... because the basic it is the important thing.

      To create a good EA you have to learn and know good strategies!

      Good luck
      What is the strategy being used for this simple Expert Advisor?
      Maybe it will be a simple strategy too. Moving Averages?


    13. #10
      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

      Welcome again


      Well in this step we will create and AE to understand what we learned in the first step.

      Ok!

      What this AE do:
      1 - Alert when we attach it to chart (init ()’s function instructions).
      2 - Alert informs us about new ticks received (start ()’s function instructions).
      3 - Alert when we exit from the EA or close the chart witch we attached the EA (deinit ()’s function instructions).

      Let’s Go:

      Open MQL4 Editor (open Metatrerder4 and press f4).
      • Open the file that we created yesterday you will find it in the right side (first_test).
      • So you will see its cotenant in the left window:

      1. int init() { }
      2. int start() { }
      3. int deinit() { }

      In each function we will put an alert as like as an instruction like this:
      //--------------------------------------------------------------------
      int init()
      {
      Alert ("Function init() executed!!!");
      return;
      }
      //--------------------------------------------------------------------
      int start()
      {
      Alert("New tick comes <=> start()’s instructions execution”);
      return;
      }
      //--------------------------------------------------------------------
      int deinit()
      {
      Alert ("Function deinit() executed!!!");
      return;
      }
      //--------------------------------------------------------------------


      Now we have to compile our EA to get an executable AE, to do (file --> compile).



      How to execute the EA:

      1. Open the Metatrader4
      2. Explore Expert Advisor tab you will find a new one named first_test
      3. Attach it to chart

      An alert will appear inform us that ("Function init() executed!!!"); for each new tick received we will see the alert ("New tick comes <=> start()’s instructions execution”); and if we close the chart another alert inform this ("Function deinit() executed!!!");

      Enjoy!!!

      Next step : Step 3 Start learning MQL4 language.


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

    Posting Permissions

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