![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jun 2007
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
I would like to compare low and new low in certain time. How to do that?
Have nice day! |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Using the wizard?
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jun 2007
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
Yes, if you can. But if we can't use Wizard, how to do it in others ways?
Thanks |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Hi Jenny,
Can you please clarify the exact condition you want? From my current understanding you want to keep a Low value from a certain time and then later in the day compare that Low value with the current Low?
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Jun 2007
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
I would like to compare Low and newLow or Most recent low with second most low, High and new High or Most recent high with second most recent high, to konw it is Bull or Bear to deside to buy or sale. Do you have some easy way?
Last edited by Jenny; 10-23-2007 at 06:54 PM.
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
If I am understanding you correctly by most recent high you mean current bar and by second most recent high you mean the high of the previous bar. If this is what you mean you can achieve this in a very nice and convenient method.
High[0] <- current bar's high High[1] <- previous bar's high High[2] <- the prior bar to the previous bar's high etc. etc. This can be done on anything using the indexing [].
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|