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:


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      23 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      120 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X