Results 1 to 3 of 3
 1 Attachment(s)    

Thread: magic number function missing

  1. #1

    Default magic number function missing

    Funyoo, or someone;
    please add magic number function to this EA
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2009


    Quote Originally Posted by getting View Post
    Funyoo, or someone;
    please add magic number function to this EA

    here we go, add this to your ea.

    extern int Magic=666;//|-------------------------- Number used by EA to identify orders placed by itself and manage them.
    extern bool AutoMagic=true;

    int init()
    if(Symbol()=="AUDCADm" || Symbol()=="AUDCAD")Magic=66601;
    if(Symbol()=="AUDCHFm" || Symbol()=="AUDCHF")Magic=66602;
    if(Symbol()=="AUDJPYm" || Symbol()=="AUDJPY")Magic=66603;
    if(Symbol()=="AUDNZDm" || Symbol()=="AUDNZD")Magic=66604;
    if(Symbol()=="AUDUSDm" || Symbol()=="AUDUSD")Magic=66605;
    if(Symbol()=="CADCHFm" || Symbol()=="CADCHF")Magic=66606;
    if(Symbol()=="CADJPYm" || Symbol()=="CADJPY")Magic=66607;
    if(Symbol()=="CHFJPYm" || Symbol()=="CHFJPY")Magic=66608;
    if(Symbol()=="EURAUDm" || Symbol()=="EURAUD")Magic=66609;
    if(Symbol()=="EURCADm" || Symbol()=="EURCAD")Magic=66610;
    if(Symbol()=="EURCHFm" || Symbol()=="EURCHF")Magic=66611;
    if(Symbol()=="EURGBPm" || Symbol()=="EURGBP")Magic=66612;
    if(Symbol()=="EURJPYm" || Symbol()=="EURJPY")Magic=66613;
    if(Symbol()=="EURNZDm" || Symbol()=="EURNZD")Magic=66614;
    if(Symbol()=="EURUSDm" || Symbol()=="EURUSD")Magic=66615;
    if(Symbol()=="GBPAUDm" || Symbol()=="GBPAUD")Magic=66616;
    if(Symbol()=="GBPCADm" || Symbol()=="GBPCAD")Magic=66617;
    if(Symbol()=="GBPCHFm" || Symbol()=="GBPCHF")Magic=66618;
    if(Symbol()=="GBPJPYm" || Symbol()=="GBPJPY")Magic=66619;
    if(Symbol()=="GBPNZDm" || Symbol()=="GBPNZD")Magic=66620;
    if(Symbol()=="GBPUSDm" || Symbol()=="GBPUSD")Magic=66621;
    if(Symbol()=="NZDCADm" || Symbol()=="NZDCAD")Magic=66622;
    if(Symbol()=="NZDCHFm" || Symbol()=="NZDCHF")Magic=66623;
    if(Symbol()=="NZDJPYm" || Symbol()=="NZDJPY")Magic=66624;
    if(Symbol()=="NZDUSDm" || Symbol()=="NZDUSD")Magic=66625;
    if(Symbol()=="USDCADm" || Symbol()=="USDCAD")Magic=66626;
    if(Symbol()=="USDCHFm" || Symbol()=="USDCHF")Magic=66627;
    if(Symbol()=="USDJPYm" || Symbol()=="USDJPY")Magic=66628;
    if(Symbol()=="USDSGDm" || Symbol()=="USDSGD")Magic=66629;
    if(Symbol()=="SGDJPYm" || Symbol()=="SGDJPY")Magic=66630;
    Business Internet Services | IX Trader Forex Software
    Registered Internet Service Provider (Ripe: AS 16195)

  3. #3


    IXbone - Thank You!
    I'm forward testing this EA in conjunction with multipurpose trade manager - expiry of 210 minutes is my main focus, I've try ManageByTradeComment, which didn't work, but with magicNumber should work in conjunction with expiry function.
    Sixths trading - an EA by macman, Bob and Steve mk 2

Similar Threads

    By anchalsoni in forum MQL programming
    Replies: 0
    Last Post: 04-22-2013, 15:36
  2. I need to add magic number to this E.A
    By lifeplusbiz in forum MQL programming
    Replies: 0
    Last Post: 05-13-2011, 13:01
  3. Replies: 8
    Last Post: 04-12-2011, 17:28
  4. How to add a magic number
    By billsechen in forum MQL programming
    Replies: 10
    Last Post: 11-26-2009, 02:58

Tags for this Thread

add, funyoo, magic, magic number, main, thank you, trading

Posting Permissions

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