Nathamus
04-10-2007, 01:02 AM
I would like to use a 1-minute indicator (for stop/limit values) in a tick timeframe strategy, both on the same instrument. The indicator values should only be updated once every minute.
e.g. FDAX, tick timeframe and a SMA(10) on a 1 minute period FDAX => SMA Value is updated only once a minute.
When I add a 2nd bar object to the strategy:
Add(PeriodType.Minute, 1);
Add(SMA(10));
This object will updated on every tick, even if I limit the OnBarUpdate() to the underling instrument on the ticktimeframe with
if (BarsInProgress != 0)
return;
It is the same with the example strategy:
When I add the SampleMultiTimeFrame strategy that is provided with NT 6.0.0.10 to a ticktimeframe chart two SMAs are plotted which are updated several times in a single minute. In the strategy code they a defined as a 5 minute SMA and a 50 minute SMA.
Did I misunderstood something? Why is the SMA updated on every tick?
e.g. FDAX, tick timeframe and a SMA(10) on a 1 minute period FDAX => SMA Value is updated only once a minute.
When I add a 2nd bar object to the strategy:
Add(PeriodType.Minute, 1);
Add(SMA(10));
This object will updated on every tick, even if I limit the OnBarUpdate() to the underling instrument on the ticktimeframe with
if (BarsInProgress != 0)
return;
It is the same with the example strategy:
When I add the SampleMultiTimeFrame strategy that is provided with NT 6.0.0.10 to a ticktimeframe chart two SMAs are plotted which are updated several times in a single minute. In the strategy code they a defined as a 5 minute SMA and a 50 minute SMA.
Did I misunderstood something? Why is the SMA updated on every tick?