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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    164 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    317 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X