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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
566 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment