as I come from mql, I wonder how to program an indicator in a way that, say I want to display 5 min indicator on 1 min timeframe, the value of the higher timeframe bar is the same on all lower timeframe bars belonging to the higher timeframe, i.e. 5x 1min bars in one 5min bar.
Right now with the attached code, the indicator is only displayed correctly at calling but from that time on, each bar is drawn differently instead of changing all lower timeframe bars belonging to the higher timeframe.
So, in short, it seems to be a displaying problem as the right value is called. Any suggestions highly appreciated.
if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired) return;
if (BarsInProgress == 0)
{
//call the data from another indicator
UP.Set(B2CForceIndexSlope(BarsArray[1],period).UP[0]);
DOWN.Set(B2CForceIndexSlope(BarsArray[1],period).DOWN[0]);
}
Comment