Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ind. To calculate directly from 4H

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

    Ind. To calculate directly from 4H

    Hi, im trying to make this indicator to calculate directly from a 4H chart


    added the period:

    Add(PeriodType.Minute, 240);

    replaced the Close[0] for: Closes[1][0]


    the checked for enough bars:

    if ( CurrentBars[1] <= longLeg || CurrentBars[1] <= shortLeg) return;

    but its not working, when i go down from the 4H to a smaller timeframe the indicator addapts to that timeframe, so i don't know what im doing wrong

    here is the file: KBT_RubberBands_V1.cs

    #2
    Hello kabott,

    Thanks for your post.

    Calculating the indicator value on BarsInProgress 0 may not give you the result you would expect, and I may suggest to calculate the indicator using the data series you added. (Calculate on BarsInProgress == 1) After calculating the values in BarsInProgress == 1, set the plots in BarsInProgress == 0.

    For example:

    Code:
    if (BarsInProgress == 1) 
    {            
        // Calculate Indi
    }
    else if (BarsInProgress == 0)
    {
        MultiHigh.Set (SyncMulti * MultiW);
        MultiLow.Set (-SyncMulti * MultiW);
        MultiOsc.Set (multiOsc);
    }
    If this does not resolve your inquiry, could you further elaborate on the results you are getting and the results you expect?

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    656 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    371 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    579 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X