Strategy tester chart speed setting - page 2

 
Rajiv Ishwar:

An indicator can give a signal when the bar opens and then that can change direction during the period of that bar if the price reverses. Once bar has closed that indicator/signal does/should not change.

This is not repainting.

Repainting is when an indicator, on each new tick/candle recalculate (and adjusts) all past values.

You are talking about an indicator that generate a signal (like an arrow) on information taken based on values from the current bar: this is often a bad idea for obvious reason about fake signals.

Anyway, for that last indicators, the only way to analyze them correctly is using a slow visual mode test and yes, you are right, for that you need control points or every tick mode.

 
Keith Watford:

Thanks, I take your point on indicators. However the same problem persists with EAs and open prices will not work for many EAs. Strategy tester states open prices must only be used for EAs "that explicitly control bar opening"

 
Rajiv Ishwar:

Thanks, I take your point on indicators. However the same problem persists with EAs and open prices will not work for many EAs. Strategy tester states open prices must only be used for EAs "that explicitly control bar opening"

I was responding to your post which was about indicators

Rajiv Ishwar:

Open price mode is not good for repainting indicators

Obviously Open Price will not be suitable for many EAs

 
Rajiv Ishwar:
When using strategy tester to test an indicator/EA, the chart speed setting is too sensitive on the right hand side and very slow on the left hand side. The makes it difficult to set the correct chart speed to observe repainting indicators properly. I hereby request Metaquotes to update that to allow proper visual mode testing via a more user friendly speed setting. Thanks.

A simple solution you might want to try.
In OnTick() or OnCalculate() add a "busy loop" with adjusted delay as you need (parameter, or whatever method you like).

Example:

void OnTick()
{
        ulong _stop = GetMicrosecondCount() + delay_parameter;
        while(GetMicrosecondCount()<_stop); // busy loop

	...
}


Now you can backtest in its highest speed, and can slow it down by setting/changing the delay_parameter to higher value.

Enjoy.

 
Soewono Effendi:

A simple solution you might want to try.
In OnTick() or OnCalculate() add a "busy loop" with adjusted delay as you need (parameter, or whatever method you like).

Example:

Now you can backtest in its highest speed, and can slow it down by setting/changing the delay_parameter to higher value.

Enjoy.

Soewono, I am not a programmer. Is this to change the code?