NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-10-2007, 12:02 AM   #1
Nathamus
Member
 
Join Date: Feb 2007
Location: Germany
Posts: 37
Thanks: 1
Thanked 0 times in 0 posts
Post imported post

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:
Code:
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
Code:
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?
Nathamus is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:27 AM.