I'm a bit confused about user defined input parameters. For example :
{
if (IsFirstTickOfBar)
priorSum = sum;
sum = priorSum + Input[0] - (CurrentBar >= Period ? Input[Period] : 0);
Value[0] = sum / (CurrentBar < Period ? CurrentBar + 1 : Period);
}
I assume Input[Period] means sum of the input for the last n period. Is that correct?
And for the same logic if I want to calculate the average high of the last n bar, the code would be High[Period] / Period, meaning High[Period] is sum of high from the last N bar. Is that correct?
Thank you very much

Comment