Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
5minute count down
Collapse
X
-
5minute count down
Hey guys, I'm curious if I want to make an indicator that draws an arrow every 5 min, using Times[1][0] and Add (Period.Minute, 5); How would I write that? I just don't get it. Is there a way to write a Timer Code that can just do Something every "x" minutes"?Tags: None
-
Hello ginx10k,
Thank you for your inquiry.
If you would like to have your script draw an arrow at the bar close of a five minute secondary DataSeries, assuming CalculateOnBarClose is set to true, you can do this:
I would suggest taking a look at this section of the NinjaTrader help guide for further information about working with multiple time frames: http://ninjatrader.com/support/helpG...nstruments.htmCode:protected override void OnBarUpdate() { if (BarsInProgress == 1) // draw an arrow if the secondary DataSeries called OnBarUpdate (this is assuming that the five minute bar is at BarsArray[1]) DrawArrowUp(....); }
If you would like to draw an arrow based on a timer instead, I would suggest taking a look at the included BarTimer indicator as this indicator does utilize a timer.
Please, let us know if we may be of further assistance.Zachary G.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
142 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
81 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
125 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
120 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
98 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment