I am trying to implement a Donchian channel indicator which needs to find the highest and lowest value of the past <period> bar. Say period is 20 then I need to find the highest and lowest value of the previous 20 bars every time I call the CalcBar() method.
Is there any simple way to do this? Instead of looping previous n bar every time?
How can I find the highest and lowest value of the series [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: How can I find the highest and lowest value of the serie [SOLVED]
Hello Sylpha,
You can use the Highest, Lowest prebuilt functions. Here is how to find the bar number of the function.
You can use the Highest, Lowest prebuilt functions. Here is how to find the bar number of the function.