New "Open Prices Only" way to handle price ?

 

Hi


I noticed that in MT5, the way backtest are conducted in "Open Price" backtests is now different : 

all the processing will be handled at the CLOSE of the bar rather than at the open as before.

I find this unsettleling as there is no way to do this in real life, because we never know when the last tick is.


The way to process data live is to wait for the open of a new bar, and THEN find the previous indicator value (i-1) and then decide if you open an order or not

so this happens at the OPEN of the bar, and never at the CLOSE. Handling all the computations at the close is weird

why this change ? This will lead to reprogramming everything, and TWICE, one for backtest and one for live trading.


I'm not sure what the devs were thinking but this is not improvement IMHO

am I missing something ?


Jeff

 

my bad it actually works the same with the same code as "per tick"

only the display is changed (it shows each bar at close value) which lead me into error

if you use the same code, for instance

static datetime tim;

if (tim != iTime(NULL,0,1))
{

        double b1 =  GetIndi(1, 0, Handle);
        double s1 =  GetIndi(1, 1, Handle);

        if (b1 > 0 && b1 < EMPTY_VALUE)

                "BUY";
        

        if (s1 > 0 && s1 < EMPTY_VALUE)

                "SELL";

}

it work the same.

so I was afraid there was some code modification to add but there is not.

my bad

Jeff

Reason: