profit and loss inputs, and outputs….

 

The expert advisor that i use have a mind of it's own(but he was programmed so it would be logical what's happening, only i can't find the 'trigger')

When i fill out for my profits 1 it's a profit of 10 . A stoploss of 100 must be filled out as ' 10'. So far so good and it is working well in my live account.

But i want to adjust it more so i run it on strategy tester. Here goes it wrong, the tester don't allow these settings, it opens trades but it won't close on my take profit level of 1(10) Even when i load the .set file, which have good trade settings, the tester don't pick up these good settings.

Therefore i have only some ' modify'' orders and closed orders on the stoploss level.

So, where in my expert advisor, which string, or somewhere else, can i change the levels for the profit and stoploss(the factor 10, where is it!).

I don't understand why this is happening. If someone knows how to change the factor 10 to normal size it would be nice!

Miraka

 
miraka1210:
So, where in my expert advisor
  1. No mind readers here. How should we know when you don't post the code

  2. Sounds like you are not adjusting for 4/5 digit brokers.
    //++++ These are adjusted for 5 digit brokers.
    int     pips2points;    // slippage  3 pips    3=points    30=points
    double  pips2dbl;       // Stoploss 15 pips    0.015      0.0150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int     init(){
         if (Digits % 2 == 1){      // DE30=1/JPY=3/EURUSD=5 forum.mql4.com/43064#515262
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    //---- These are adjusted for 5 digit brokers.
        /* On ECN brokers you must open first and THEN set stops
        int ticket = OrderSend(..., 0,0,...)
        if (ticket < 0)
           Alert("OrderSend failed: ", GetLastError());
        else if (!OrderSelect(ticket, SELECT_BY_TICKET))
           Alert("OrderSelect failed: ", GetLastError());
        else if (!OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0)
           Alert("OrderModify failed: ", GetLastError());
         */
    

 

Are you using the same Broker and MT4 installation for your Live account as you are for the Strategy Tester ?

What you are describing sounds like a 4/5 digit issue, if you use the same Broker you should be OK.

Reason: