NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-30-2007, 04:46 PM   #1
PrTester
Senior Member
 
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
Post imported post

Is there a way to access the High[0] value in a milti time frame strategy.

Ex.

High[0] - 15min ==> ?

High[0] -30min ==>?
PrTester is offline  
Reply With Quote
Old 04-30-2007, 04:55 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

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.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 05-01-2007, 01:01 AM   #3
PrTester
Senior Member
 
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
Post imported post

Thanks, works nicely!.
PrTester is offline  
Reply With Quote
Old 05-02-2007, 01:04 AM   #4
PrTester
Senior Member
 
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
Post imported post

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.
PrTester is offline  
Reply With Quote
Old 05-02-2007, 01:13 AM   #5
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

It would be this:

Stochastic(BarsArray[1], 5, 20, 5).D[0];

Ray

NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:50 PM.