![]() |
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 |
|
Senior Member
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
|
Is there a way to access the High[0] value in a milti time frame strategy.
Ex. High[0] - 15min ==> ? High[0] -30min ==>? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
High[0] accesses the high of the current bar on the current series
High[1] accesses the high of 1 bar back on the current series High[2] accesses the high of 2 bars back on the current series etc. Highs[0][0] accesses the high of the current bar on the first series Highs[0][1] accesses the high of 1 bar back on the first series Highs[0][2] accesses the high of 2 bars back on the first series etc. Highs[1][0] accesses the high of the current bar on the second series Highs[1][1] accesses the high of 1 bar back on the second series Highs[1][2] accesses the high of 2 bars back on the second series etc.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
|
Thanks, works nicely!.
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
|
Dierk,
Is there a way to access Indicator value in a TimeFrame, EX If I want to access theD value of STo in another Time Frame Stochastic(BarsArray[1], 5, 20, 5)[0].D; or Stochastic.D(BarsArray[1], 5, 20, 5)[0]; or Stochastic(BarsArray[1].D, 5, 20, 5)[0]; Thanks in advance. |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
It would be this:
Stochastic(BarsArray[1], 5, 20, 5).D[0]; Ray
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|