Thank you for your help @Nicolas and @Vonasi.
I also had the same problem: the indicator returns an error message.
According to Vonasi, the problem comes from the Donchian channel calculation performed by PRT.
So I incorporated the calculation in your 2 indicators, replacing the lines :
hh= DonchianChannelUp [500]
ll= DonchianChannelDown [500]
by
hh= HIGHEST [DH](HIGH)
ll=HIGHEST [DL](HIGH)
DH(Donchian High) and DL(Donchian Low) are variables with default values of 500.
In Nicholas’ indicator it effectively traces the lines, but in Vonasi’s indicator it did not allow to display them.
To create an indicator with a high probability of reversal, can these 3 points be improved?
1. Removal of levels when the price has crossed them
In the picture posted in my first message, I make the lines continue until the prices go through them. Once crossed the levels are no longer relevant and pollute the image by sending lines whose probas of reversing the price are lower than lines that have not been crossed.
Example in image 1.DL
To avoid erasing levels that have been briefly crossed, if you can add two filters (modifiable by a variable) to choose to keep :
-lines that have been crossed by less than 5/10/x points
and
-lines whose price remained less than 1/2/x candles beyond .
Example in image 2.DL
2. Display of the most relevant levels
The current indicator takes into account all levels of Donchian.
But in a trend we can see that a Donchian level is often only a pause level of the trend and this level is quickly broken.
To avoid displaying levels that are not solid, if you can add two filters (modifiable by a variable) to choose to keep only:
– levels that have reversed prices for more than 20/50/x candles
and
– levels that have reversed prices by more than 20/50/x points (an SMA5 can be used to choose the timing of the beginning and end of the reversals)
Example in images 3.DL and 4.DL
3. Display levels in smaller time units
To trade reversals, traders look for levels/areas on large time units and use setups on small time units to take positions with good timing.
For this it is important to be able to display the indicator levels on several time units, for example :
– display the levels detected by the indicator in H4 on 5min.
– display the levels detected by the indicator in H1 over 1min.
…
Not only will this allow discretionary traders to display all important information on the same screen, but it will also allow them to program trading algorithms where everyone can use their own setups to enter and exit positions.
If we can create this indicator, I will share in the library a reversal algorithm created from it.
Thank you for your help. 😀