Working in live-test but only sometimes in backtesting

Back to topics list To post a new topic, please log in or register
avatar
315
sunshineh 2016.03.08 09:57
 

Hi, 

I have an indicator which works very fine in live test. It has to calculate quite a lot and draw some objects in the chart.

But when I do a visual backtest, the indicator sometimes starts showing me the right objects and after a time it shows nothing.

Could it be, that the OnCalculate function in backtesting is calling to fast, so that the indicator hasn't been finished with calculating? 


 

avatar
2017
gooly 2016.03.08 10:14 #
 
Have you checked the tester's journal tab for e.g. array out range or zero devide...?
avatar
315
sunshineh 2016.03.08 10:56 #
 
Yes, that's working fine and I also a few see my testing results as Print-Messages there. 
avatar
2017
gooly 2016.03.08 11:31 #
 

sunshineh:

But when I do a visual backtest, the indicator sometimes starts showing me the right objects and after a time it shows nothing.

Then put some Print() like:

if ( Time[0] >= D'2015.11.12 09:00' )
    Print();
or use Comment(..) to see what's happening.
avatar
Moderator
3418
GumRai 2016.03.08 11:57 #
 
It could be the way that the objects are named. If they are not named with the Time of the relevant bar time included, the name could be repeated and so a new object with the same name will not be created.
avatar
315
sunshineh 2016.03.09 23:11 #
 

Thanks for your tipps. 

The strange part is, that it works the days before, without changing anything!

So I choose different names for the object and also my comment shows the correct time, so I see everything it working. 

Also my print messages are working.

 

It happens, when I calculate the values from M15  and want to draw it into my M5 chart. 

But has been working fine already... 

avatar
315
sunshineh 2016.03.10 10:40 #
 

Hi,

now I found the same problem, with this indicator

https://www.mql5.com/en/code/8033

When I put it on my chart during visual backtesting(M5), and that the TF from the MTF Stochastic Indicator to 15, than I sometimes the values are shown correctly from M15 and the most time only the clock from the indicator is running, but NO line :-(

It's strange!

How can I solve that problem, because testing and fetching and drawing values from another timeframe is an important point for me!!

Back to topics list  

To add comments, please log in or register