Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
new indicator need time left in bar
Collapse
X
-
new indicator need time left in bar
I'm trying to make an indicator that will alarm when the price moves x points within x amonut of time. i tried to use the bartimer indicator in my code but it will not work. i saw there is a Bar.PercentComplete would this work the same way.Tags: None
-
cbart_1,
What sort of time frame are you looking at? Over how long of an interval are you testing this? It seems like you are looking at using a discrete derivative. I.e. change in Price over change in Time.
Something like :
( Close[0]-Close[5] ) / (0 bars - 5 bars) would work unless you have specific requirements as to the time, i.e. you are on a 60 minute chart and want to calculate the difference based on 1 minute times or something. This is only required to maintain the proper units.Adam P.NinjaTrader Customer Service
-
Over what period are you calculating the difference, is it intra-bar? Or are you calculating it across a few bars? Essentially. you don't really need to use units of time if you think of your time as each "bar". Then its just a simple difference Close[a]-Close[b] or whatever.
It just depends on how important having actual time as your units are, i.e. if you want Change in price / minute or Change in price / bar.Last edited by NinjaTrader_AdamP; 10-17-2011, 03:01 PM.Adam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
152 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
89 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
133 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
127 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment