Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multi time frame incorrect

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

    multi time frame incorrect

    Hi, I'm using a multitime frame to just see the close of each time frame, i added a 5 minute 15 minute e a 1 day series.
    But when i look at the output I have the output of the daily result every 7/8 output of 15 minutes series, that means it's not done daily but with another interval. Am i missing something ?
    thanks

    else if (State == State.Configure)
    {
    AddDataSeries(BarsPeriodType.Minute, 5);
    AddDataSeries(BarsPeriodType.Minute, 15);
    AddDataSeries(BarsPeriodType.Day, 1);

    }
    }

    protected override void OnBarUpdate()
    {

    if ( BarsInProgress == 0)
    {
    Print("Bar in progress 0 : " + Close[0].ToString());
    }

    if ( BarsInProgress == 1)
    {
    Print("Bar in progress 1 : " + Close[0].ToString());
    }
    if ( BarsInProgress == 2)
    {
    Print("Bar in progress 2 DAILY : " + Close[0].ToString());
    }

    #2
    Hello AlessioCianini12,

    Thank you for your post.

    You're not printing on the correct BarsInProgress. Keep in mind that BarsInProgress == 0 will always be the primary data series on the chart, and then the BarsInProgress index for each additional series added with AddDataSeries would start at BarsInProgress == 1 and go up for each added series. Try this and you should see the prints you'd expect:

    Code:
    if (BarsInProgress == 1)
    {
    Print("Bar in progress : "+ BarsInProgress + " 5 : " + Close[0].ToString());
    }
    if (BarsInProgress == 2)
    {
    Print("Bar in progress : "+ BarsInProgress + " 15 : " + Close[0].ToString());
    }
    if (BarsInProgress == 3)
    {
    Print("Bars in progress: "+ BarsInProgress + " DAILY : " + Close[0].ToString());
    }
    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