Print the values of CurrentIndi and PreviousIndi when it comes to open an order.
Hi,
So with ControlPoints testing is a fake testing and really low accuracy,that's just for estimation,
So you would test it by every tick,and as you know at exact time hour 22:00 it may can't be reached exactly to the main rule(previous daily candle below 0,current candle above 0),

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello every one.
Ok, so I'm trying to automate my testing and I'm having issues with getting right results, or getting rid of mistakes that strategy tester, ea, or something makes.
For the moment I'm trying to just make simple backtest ea that trades when indicator crosses 0 line... and there are some mistakes I can't figure out.
For example, trying to make only long trades when indicator moves above 0 line.
Logic should be simple, right?
If CurrentIndicatorValue is greater than 0.0 and PreviousIndicatorValue is lower than 0.0 -> make a trade. Yet mistakes happen and I have no idea why, especially when I try to trade only once per candle at certain time based on daily chart.
Trying to test on GBPCAD pair in range from 2016.12.30 to 2018.12.31, on OANDA MT4 client. There should be 21 trades, which there are using control points model, but 2 of them are misplaced (one missed completely, other in wrong place)
Here is code:
In two cases results are somehow with mistakes.
On screen #2, trade to the left of first line is correct, yet line clearly crosses upwards so there should be next trade to the left of second line and it's not there
Screen #3, trade to the left of line is fine (indicator had positive value on current candle, and negative on previous one), and on previous candle, the firs trade somehow there is trade while values for both current and previous candle are negative...
And I have no clue how to figure out what is wrong... I will admit that I'm far from best programmer, but how tester can miss trade when conditions are clearly met, or made one where both of them are not met while making 19 other as they should? And there are even more missing trades on other currency pairs. Tried to download historic data, tried not to download historic data still wimple logic is not followed... It's just not making any sense to me...