Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

So near yet so far .......Higher Timeframe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    So near yet so far .......Higher Timeframe

    On a 1 minute chart I want to plot the high and low of the last completed 30 minute bar.

    I have successfully plotted SMA/EMA of a higher timeframe using:

    Add(PeriodType.Minute,
    5); // Adds a 5 MINUTE Bars object
    ....

    HigherLongerEMA.Set(SMA(BarsArray[1],longerperiod)[0]);


    for example.

    However when I try to plot the 30 min High and Low, no matter what I try I cannot get anything to work.

    I even tried an SMA for 1 period for example adding High and got the 2many arguments error.

    Can someone please point out a simple fix.

    Help


    #2
    Originally posted by skiguy View Post
    On a 1 minute chart I want to plot the high and low of the last completed 30 minute bar.

    I have successfully plotted SMA/EMA of a higher timeframe using:

    Add(PeriodType.Minute,
    5); // Adds a 5 MINUTE Bars object
    ....

    HigherLongerEMA.Set(SMA(BarsArray[1],longerperiod)[0]);


    for example.

    However when I try to plot the 30 min High and Low, no matter what I try I cannot get anything to work.

    I even tried an SMA for 1 period for example adding High and got the 2many arguments error.

    Can someone please point out a simple fix.

    Help

    Just the same way. If you want to get the lowest low & highest high of the secondary series over the last 20 bars (this period is of the secondary series):

    double lowestLow = MIN(Lows[1], 20)[0];
    double highestHigh = MAX(Highs[1], 20)[0];
    Last edited by ninZa; 03-01-2015, 11:42 PM.
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Hello skiguy,

      Thank you for your post.

      You could add a 30 minute bar series and just call Highs and Lows for the barsInProgress. If the 30 minute was the only added series you would use Highs[1][0] and Lows[1][0]. For information on multiple series in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

      Please let me know if I may be of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      173 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      328 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      252 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      354 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      181 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X