How can I find the highest and lowest value of the series  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
Sylpha
Posts: 29
Joined: 14 Apr 2015
Has thanked: 1 time

How can I find the highest and lowest value of the series

Postby Sylpha » 22 Apr 2015

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?

User avatar
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]

Postby Henry MultiСharts » 23 Apr 2015

Hello Sylpha,

You can use the Highest, Lowest prebuilt functions. Here is how to find the bar number of the function.


Return to “MultiCharts .NET”