![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Is it possible to calculate values, such as the HIGH price between two particular time periods...for example between 12:00-16:00 GMT and store this in a variable? Thanks in advance. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
There is no method for this in NinjaScript layer. You would have to self calculate by checking bar times and storing values appropriately.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you. So I guess something like this might be appropriate?
if(ToTime(Time[0]) == 160000) { //do something to check for high price back correct # of bars (based upon chart timeframe) to 12:00... } |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Yes, something like that... You are on the right track.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks, I guess I'll work with it then...
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calculate time in seconds between the close of two bars | OnePutt | General Programming | 14 | 05-29-2008 01:38 AM |
| Period 14 crossing Period Linear Regression 25 | Viper3 | Strategy Development | 8 | 10-21-2007 10:51 AM |
| Calculate High for every x minutes | NinjaTrader_Josh | Indicator Development | 5 | 07-20-2007 06:31 AM |
| How to write a time period in wizard? | Jenny | Strategy Development | 19 | 06-18-2007 07:04 AM |
| Calculate time in seconds between the close of two bars | OnePutt | Automated Trading | 0 | 12-31-1969 06:00 PM |