Hi Guys what is the code for the middle donchian channel line? I know the top and bottom are highest and lowest, but cannot code the middle?
From https://www.prorealcode.com/prorealtime-indicators/donchian/:
Upper = HIGHEST[a](HIGH[1])
Lower = LOWEST[a](LOW[1])
Middle = (Upper + Lower) / 2
RETURN upper AS"uper", lower AS"lower", middle AS"middle"
donchianUpperBand=Highest[50](close[1])
donchianLowerBand=Lowest[50](close[1])
This is what I coded, but can’t get middle to work?
Did you try the code from Roberto? It should work.
Middle of a Donchian channel is the same as Kijun from Ichimoku, FYI.
Yes, but this code is an itf file which is an indicator. I am trying to code it for my algo trading.
I see know that it is an indicator I can use it in my code by clicking on it and it will automatically code it for me. THANK YOU
How do I put this on my price chart rather than a field below the price?
Click on the WRENCH in the upper left corner of your price chart, then click ADD and select the indicator.