• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossAbove / CrossBelow Clarification for MultiTimeframe

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

    CrossAbove / CrossBelow Clarification for MultiTimeframe

    Hello,

    I have a MultiTimeframe strategy, and a condition for CrossAbove / Below.
    Does the "look back period (I have 10 in my case)" applies to the BarsArray bars of the indicator (5 minutes in my case), or the BarsInProgress bars, (1 Tick in my case)?

    (State == State.Configure)
    {
    AddDataSeries(Data.BarsPeriodType.Minute, 5);
    AddDataSeries(Data.BarsPeriodType.Tick, 1);

    }
    else if (State == State.DataLoaded)
    {
    RSI1 = RSI(BarsArray[2], 14, 3);
    }

    protected override void OnBarUpdate()

    (CurrentBars[0] < 15) || (CurrentBars[1] < 15) || (CurrentBars[2] < 15 && (State == State.Historical))
    return;

    if (BarsInProgress == 2)
    {
    if CrossAbove(RSI1.Default, 70 , 10)

    {
    do something
    }
    }
    Thank you!

    #2
    Sorry I meant:

    (State == State.Configure)
    {
    AddDataSeries(Data.BarsPeriodType.Minute, 5);
    AddDataSeries(Data.BarsPeriodType.Tick, 1);

    }
    else if (State == State.DataLoaded)
    {
    RSI1 = RSI(BarsArray[1], 14, 3);
    }

    protected override void OnBarUpdate()

    (CurrentBars[0] < 15) || (CurrentBars[1] < 15) || (CurrentBars[2] < 15 && (State == State.Historical))
    return;

    if (BarsInProgress == 2)
    {
    if CrossAbove(RSI1.Default, 70 , 10)

    {
    do something
    }
    }

    Comment


      #3
      Hello YakusaTrader,

      Thank you for your post.

      As written, the lookback period would apply to your 5 minute bars as those would be held in BarsArray[1] used in calculating RSI1.

      Here is a link to further info on the AddDataSeries() method:
      https://ninjatrader.com/support/help...dataseries.htm

      Please let us know if we may be of further assistance to you.

      Kate W.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by digibob, Today, 10:01 PM
      0 responses
      1 view
      0 likes
      Last Post digibob
      by digibob
       
      Started by ptertich, Today, 09:59 PM
      0 responses
      1 view
      0 likes
      Last Post ptertich  
      Started by sledge, Today, 06:11 PM
      1 response
      8 views
      0 likes
      Last Post sledge
      by sledge
       
      Started by Bionian, Today, 02:46 PM
      2 responses
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by rwilliam, Today, 01:54 PM
      1 response
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X