Login Page - Create Account

Support Board


Date/Time: Sat, 10 May 2025 19:41:29 +0000



Post From: Bar Range Function

[2016-01-15 20:08:31]
Johnny - Posts: 99
Here's the code:

int Index = sc.Index;
SCFloatArrayRef High = sc.High;
SCFloatArrayRef Low = sc.Low;


float MaxBarRange(int NumberOfBars, int Shift)
{
if(Shift <= Index)
{
MaxValue = High[Index - Shift] - Low[Index - Shift];

for(int i = Index - Shift - 1; i >= 0 && i > Index - Shift - NumberOfBars; i--)
{
if(High - Low > MaxValue) MaxValue = High - Low;
}

return MaxValue;
}
}


I also get the error: expected '}' at end of input.