Help with MT EA

To add comments, please log in or register
Race
46
Race  
Simon Gniadkowski
17274
Simon Gniadkowski  

Please use this to post code . . . it makes it easier to read.

William Roeder
22403
William Roeder  
  1. Use SRC
  2. double MyPoint=Point;
    if(Digits==3 || Digits==5) MyPoint=Point*10;
    EA's must adjust TP, SL, AND slippage
    //++++ These are adjusted for 5 digit brokers.
    int     pips2points;    // slippage  3 pips    3=points    30=points
    double  pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int     init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    

  3. for(int cnt=0;cnt<OrdersTotal();cnt++)
    {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if(OrderType()<=OP_SELL &&
    OrderSymbol()==Symbol() &&
    OrderMagicNumber()==MagicNumber
    )
    {
    Always test return codes. You MUST count down when closing or in the presence of multiple orders from multiple charts. Always count down.
        for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
            OrderSelect(pos, SELECT_BY_POS)                 // Only my orders w/
        &&  OrderMagicNumber()  == magic.number             // my magic number
        &&  OrderSymbol()       == Symbol()                 // and my pair.
        ){
    

Race
46
Race  
William Roeder
22403
William Roeder  
1Sword:
Can you insert that into the code
iv tried that code under your 3 count down before and again now it didnt change anything
  1. No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
  2. Did you post your changes? Did you add print statements to find out WHY? YOU must understand what is going on to fix it, not see it doesn't work and through up your hands and say 'nothing changed.' You don't want to put ANY effort into your coding, neither will we.
Race
46
Race  
Simon Gniadkowski
17274
Simon Gniadkowski  
1Sword:

Kiss my ass get off your high horse whreoder and help a few if that what your doing here or dont reply at all! What im asking is not unresonable i did what you said it didnt work so dont talk shit The EA works i just need it Multi trade, why dont you explain or show me what your talking about if it doesant work for you then shut up!

You should read before you "open your mouth" (type a reply) . . .
WHRoeder helps plenty with good quality code . . .
Race
46
Race  
Simon Gniadkowski
17274
Simon Gniadkowski  

Some people here, WHRoeder included, give up their free time to try and help others learn . . is not a free "I'll code anything you like service" . . . if you want something coding for you and you don't want to do it yourself go here: https://www.mql5.com/en/job and pay.

If you want to learn and code your own stuff with help . . then stay here . . .

Race
46
Race  
Race
46
Race  

If you people are here to help then do it or dont reply DONT fucking waist my time with bullshit codes that dont work and dont explain yourself

12
To add comments, please log in or register