Support Board
Date/Time: Sat, 10 May 2025 19:42:53 +0000
Post From: Bar Range Function
[2016-01-15 20:34:19] |
|
This code seems fine: 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; } } Therefore, just make sure that it is located above the function where it is being called from and we would not expect there to be a compiler error. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |