Results 1 to 4 of 4
 0 Attachment(s)    

Thread: 2 or more expression in one EA with different Magic

  1. #1

    Default 2 or more expression in one EA with different Magic

    Is it possible create , 2 ore more expression to buy or sell in one EA with different magic numbers..

    Thanks for help

  2. #2

    Default

    Quote Originally Posted by assassin View Post
    Is it possible create , 2 ore more expression to buy or sell in one EA with different magic numbers..

    Thanks for help
    Yes, just set up different integers for magic_a, magic_b, etc and use these different magic numbers according to the each different entry condition.

    Remember to alter any trailing stop-loss function that you might use so that it also differentiates between the different magic numbers.

    Hypothetically, you could use this type of approach to combine multiple different EAs and form a "master" EA. The problem here though is that US brokerages are operating under NFA Hedging Regulations and MT5 will supposedly not permit hedging either, so there seems little point in developing the concept of a "master" EA.

  3. #3

    Default

    Quote Originally Posted by jezzer1961 View Post
    Yes, just set up different integers for magic_a, magic_b, etc and use these different magic numbers according to the each different entry condition.

    Remember to alter any trailing stop-loss function that you might use so that it also differentiates between the different magic numbers.

    Hypothetically, you could use this type of approach to combine multiple different EAs and form a "master" EA. The problem here though is that US brokerages are operating under NFA Hedging Regulations and MT5 will supposedly not permit hedging either, so there seems little point in developing the concept of a "master" EA.
    thanks , is there any one for sample ( as EA )
    just a look for codes

  4. #4

    Smile check out vForcelikeEAv202

    Quote Originally Posted by assassin View Post
    thanks , is there any one for sample ( as EA )
    just a look for codes
    Hi assassin,
    I saw Funyoo has used this in his vForceLikeEAv202
    About post 323, here: vForce Like EA

    Ticket1=OrderSend(Symbol(),OP_BUYSTOP,ILots1,High[i]+MarginPips*point,Slippage,SL,TP,"mn"+Magic1+" "+EAName,Magic1,Expire,Blue);
    Ticket2=OrderSend(Symbol(),OP_BUYSTOP,ILots2,High[i]+MarginPips*point,Slippage,SL,0,"mn"+Magic2+" "+EAName,Magic2,Expire,Blue);

    cheers bt2
    Last edited by bt2; 06-23-2009 at 06:01. Reason: Add link

Similar Threads

  1. Expression has no effect
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 08-28-2014, 15:27
  2. MAGIC NUMBER
    By anchalsoni in forum MQL programming
    Replies: 0
    Last Post: 04-22-2013, 16:36
  3. I need to add magic number to this E.A
    By lifeplusbiz in forum MQL programming
    Replies: 0
    Last Post: 05-13-2011, 14:01
  4. How to add a magic number
    By billsechen in forum MQL programming
    Replies: 10
    Last Post: 11-26-2009, 03:58

Tags for this Thread

backtesting, eas, expert, hedging, high, magic, mt5, nfa, sample, slippage, stop, trailing

Posting Permissions

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