I try to get the highest high from my index but indicator wont appear in the chart even if it compile. What did i do wrong? Is it because it only work OnBarUpdate, what about Onrender?
for(int barIndex = ChartBars.GetBarIdxByX(chartControl, cursorPointX) - someOtherInt; barIndex <= ChartBars.GetBarIdxByX(chartControl, cursorPointX); barIndex++)
{
int highestBarsAgo = HighestBar(High, barIndex);
double highestPrice = High[highestBarsAgo];
Print(highestPrice);
}
If i use
double highPrice = Bars.GetHigh(barIndex);
Print(highPrice);
It return more than one answer. It start from first bar and give me the high price of that bar and than keep on giving me the high of the next bars. All i want is the highest high of the entire index.
ty
Comment