The Donchian Channel indicator was created by Richard Donchian. It uses the highest high and the lowest low of a period of time to plot the channel. The Donchian Channel Expansion/Contraction Ratio indie was written by cclsys (who hasnt been on the forums lately: I miss his posts) and does a projection of the channel which are ouputted as 'ProjectHigh' and 'ProjectLow'. What I would like to do is 'capture' those two values to use them in a strategy. Unfortunately I am lacking in insight into the correct way to do it efficiently.
First off, I dont want the values of 'ProjectHigh' and 'ProjectLow' as at a # of 'barsago' : I need the last few 'ProjectHigh' and 'ProjectLow' values which might have been spread out over 20 or more bars: one use would be a chop tool to see how much the values are 'stepping' from the second previous value of 'ProjectHigh' or 'ProjectLow' to the most recent value of 'ProjectHigh' and 'ProjectLow' etc: on the image are the values of three 'ProjectLow' that are representing 4 range bars of travel.
Can any kind soul at least 'notepad' what code would be best to use. I thanks much in advance for code contributions.
Image attached as it easier to show than tell lol
The following user says Thank You to Trader.Jon for this post:
I thought I had something working , but when I tried to run the compiled strategy it wont show any trades... when I take out all the 'double's I put in the strategy runs and shows trades.. back to the drawing board with no idea how to make it work ... any code gurus able to take a stab at this please?