Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Minute timer on Range or Tick Period?
Collapse
X
-
Minute timer on Range or Tick Period?
Is it possible to have a timer that triggers every new clock minute on an instrument that is set up for Range or Tick PeriodsTags: None
-
reply
Would that be dependent on CalculateOnBarClose = False??
In other words, the trigger of the timer would be dependent on the data feed in order to be triggered?
If yes, then is there another way that is not dependent on the data feed?
Comment
-
Yes, timer object would be one aspect of it. And if you need to draw on chart at a different frequency than bar updates, will also have to override the Plot() method. We do not provide support for this but there is a sample available in all installations. Tools > Edit NinjaScript > Indicator > CustomPlotSample.Ryan M.NinjaTrader Customer Service
Comment
-
start on minute boundary
Hi Ryan,
OK, the pieces are coming together...now the last part...
I would like to start the timer exactly on a minute boundary, not on a bar event... so that it triggers exactly one minute later, and so on...
(remember that these are tick or range bars...it would be easy if it were a 1 minute chart..)
any suggestions?
Thanks
Comment
-
My first reply offered this. Did you get a chance to apply it to a chart? It doesn't override plot so apply it to a liquid market and run with CalculateOnBarClose = false. DateTime.Now is your computer clock so not connected to bar updates.Last edited by NinjaTrader_RyanM1; 10-05-2011, 01:51 PM.Ryan M.NinjaTrader Customer Service
Comment
-
reply
OK, yes I tried that....however, it only updates when there is a tick....after hours and even during the day some slow moving instruments may not have a tick in a minute.
I just tested this on CL (oil) around 7pm New York and it actually has dropped below a tick a minute at some times and the time didn't update when the clock turned over a minute.
DrawTextFixed("myText", (DateTime.Now.Minute).ToString(), TextPosition.BottomRight);
It might be OK to use it like this..." close enough", but I was hoping to set up the timer exactly on a minute boundary then just let it fire.
Comment
-
It's not the value DateTime.Now.Second that needs to be changed here. It's that all the plotting and drawing logic is tied to OnBarUpdate. If you need to draw on chart at a different frequency than bar updates, you have to override plot method.Last edited by NinjaTrader_RyanM1; 10-06-2011, 10:48 AM.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
629 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
362 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
564 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment