This indicator is made of the classical Donchian Channel, but the upper and lower are factorized by the Average True Range of recent periods (pd value). The trend revert is “activated” when the close crossed above or below the upper or lower line.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
////DONCHIAN CHANNEL ACTIVATOR/// ///VARIABLE //pd = 5 //ot = 1 //Factor = 1 hi = HIGHEST[pd](high)[ot] lo = LOWEST[pd](low)[ot] DUpper=hi+Factor*AverageTrueRange[pd](close) DLower=lo-Factor*AverageTrueRange[pd](close) if f=1 then if close<lo then f=-1 c=DUpper//hi else c=DLower//lo endif else if close>hi then f=1 c=DLower//lo else c=DUpper//hi endif endif return c coloured by f as"donchian activator" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Nicolas
I like this and would like to understand it fully so please forgive the (maybe) daft questions! ha
When would the Factor be other than 1? I’ve tried optimising and it came out best at 0.99 so I’ve left it at 1. Is it to stop ‘looping’ … or am I missing a trick here? No need for in depth (save you time) … just a few words will probably do for me to get my head around and then I’ll think on what you say.
I understand the function of the pd and ot setting … but what does pd and ot stand for please?
Many Thanks
Graham
PS Why is it called ‘britains-*-*’ … I’m a bit weird re needing to know odd things! ha
PPS why is my text coming out double-spaced … I cant see a format option, but I bet you know why Nicolas?
Hi GraHal, the Factor parameter is only a multiplier of the ATR that is added or subtracted to the main lines (hi or lo). So it could be inferior to 1 of course and superior too indeed. I don’t know where do you optimized the value? In a ProBacktest strategy?
“pd” is the lookback period of the indicators (ATR and Highest/Lowest values). The “ot” is the period offset of the Highest/Lowest values lookback.
‘britains’ is the name of the guy who give me a bunch of indicators and strategies to share with the Prorealtime community. He doesn’t trade anymore and he found it would be nice to share with others all of his past work.
Nicolas, thank you for your useful and informative response.
Yes I optimise using ProBacktest.
‘Mr Britain’ (great name! ha) is / was very kind sharing his past work with us all.
Thank You
Graham