Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
|
55 responses
5,455 views
0 likes
|
Last Post
by BartMan
Today, 03:25 PM
|
||
Started by DawnTreader, 05-08-2024, 05:58 PM
|
16 responses
52 views
0 likes
|
Last Post
by DawnTreader
Today, 03:20 PM
|
||
Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
|
15 responses
61 views
0 likes
|
Last Post Today, 03:19 PM | ||
Started by kevinenergy, Yesterday, 12:01 PM
|
8 responses
28 views
0 likes
|
Last Post
by kevinenergy
Today, 03:16 PM
|
||
Started by nightstalker, Today, 01:32 PM
|
1 response
12 views
0 likes
|
Last Post Today, 02:54 PM |
Comment