Kahler’s Excess Detector
Forums › ProRealTime English forum › ProBuilder support › Kahler’s Excess Detector
- This topic has 12 replies, 4 voices, and was last updated 2 years ago by Madrosat.
-
-
12/02/2021 at 11:08 PM #182755
Hi!
This indicator detects excess market moves. It is stated, that it “overcomes many of the downsides of traditional ones like RSI or Bollinger Bands”.
The magic: it only shows bullish or bearish excess trends for a chosen timeframe. No detection, no line.How to use it:
“If the indicator tells me that there has been an excess bearish move, I will not set up a new short position. I neither would set up a long position if this sell off happened in a bearish market.
If there has been an excess bearish move in an uptrend, I might want to start to scale into a long position, using a tight stop loss at the beginning and the let it run until my indicator flashes a warning sign in the other direction.”All the info:
https://www.quanttrader.com/index.php/detecting-excess-market-moves/KahlerPhilipp2021Is it possible to translate this code? Many thanks!
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455Meta: subchart(false); // (c) Philipp Kahler 2021 quanttrader.comInputs: minBars(5), maxBars(200), reversaltype(longreversal, shortreversal, both),confirmationbars(1), Volaexcess(3);Arrays: Mom[maxbars];Variables: kv, kvp, i, m, signal, global::signal, extreme, position;function kvol begin // returns Kahlers Volatility %/barVariables:i, rp,rc, rpsum, rcsum, call, put, counter;if close[1]<>0 then beginrc=maxlist((close-close[1])/close[1],0);rp=maxlist((close[1]-close)/close[1],0);end;rcsum=rcsum+rc;rpsum=rpsum+rp;if (rc+rp)>0 then counter=counter+1;if counter>1 then begincall=rcsum/counter;put=rpsum/counter;end;Kvol=100*(call+put);end;kv=kvol;//period(10*maxbars);signal=0;if barnumber>200 then beginfor i=maxBars to MinBars step -1 beginkvp=kv*sqrt(i);m=100*(close-close[i])/close;mom[i]=abs(m)/kvp;end;end;extremesarray(mom,maxbars,1,extreme,position);if extreme>volaexcess and position>minbars then beginif close[position]>close and (reversaltype=both or reversaltype=shortreversal)and lowest(close[-confirmationbars],confirmationbars)>=closeand close=lowest(close,position)and close[position]=highest(close,position+1)then begindrawtrendline(datetime,lowest(close,position),datetime[position],highest(close,position+1),stylesolid,2,red);signal=1;end;if close[position]<close and (reversaltype=both or reversaltype=longreversal)and highest(close[-confirmationbars],confirmationbars)<=closeand close=highest(close,position+1)and close[position]=lowest(close,position+1)then begindrawtrendline(datetime,highest(close,position),datetime[position],lowest(close,position+1),stylesolid,2,darkgreen);signal=-1;end;end;global::signal=signal[confirmationbars];12/03/2021 at 9:43 AM #18277012/03/2021 at 9:59 AM #182773Thank you very much, Nicolas.
You did already translate the inside part of the volatility indicator (KVOL) in 2019, here:
https://www.prorealcode.com/topic/kahlers-fair-bet-historical-volatility-indicator/Hope this helps and that this function is doable!
12/03/2021 at 2:17 PM #182775Here is the Kahler’s Excess Detector indicator translated for ProRealTime.
I’m posting it here because I have technical issues with library at the moment.
2 users thanked author for this post.
12/03/2021 at 6:21 PM #182783It works! Thank you so much for this quick reply. Now I’m going to backtest. Amazing work!
The only thing is with the zoom. I have to zoom in manually, then i looks great. But with a double mouse klick for auto zoom it shows the -1 0 1 diagram at the bottom of the chart as well.
I can live with it. Or did I do something wrong and it’s possible to turn that off?Thanks again
1 user thanked author for this post.
12/04/2021 at 7:53 AM #18279812/06/2021 at 4:01 PM #182887Price settings / Scale / Use price only,
or remove the “signal” variable from the RETURN instruction.
1 user thanked author for this post.
12/06/2021 at 7:31 PM #18290812/07/2021 at 11:25 AM #18292712/12/2021 at 9:59 AM #183175@Nicolas: In the settings of the indicator, changes to the “Volaexcess” have no effect on the indicator. It should have the effect shown in the picture. See red circles and the amount of red/green lines. Could you please look into it?
@all:
As for the strategy:
This indicator tells you when the markets have moved too far. So for the trading stradegy we have to know what the overall trend is.
What do you think of this idea:- Decide on the timeframe (min/maxBars): 3 to 10 bars [short term = 3 to 10 bars, mid term=10 to 21 bars, long term=21 to 200 bars]
- What is the Trend? (How to detect a trend with code?)
If general trend is bullish: wait for a red line (excess bearish move), set a long position, and a tight stop loss - I’m not sure on when to sell: wait for the next red line? (maybe the right setting in Volaexcess will help)
12/12/2021 at 1:25 PM #18320612/13/2021 at 8:50 AM #183224Unfortunalety I couldn’t find the exact same instrument in PRT.
But for the DAX40 Perf Index the Volaexcess works for high numbers. So instead of 1, 3, 5 larger numbers (3-/4-/5-digits) are working.12/19/2021 at 8:13 AM #183583Nicolas wrote :The signals are generated at the end of the line, not at their beginning.
Hello Nicolas can you help me I can’t crack the code
Can we have a signal at the end of the line ??
or do you have a tip explain for i can use this indicator or ( une partie de l’indicator) for a strategy.
Have a good day
Madrosat
-
AuthorPosts
Find exclusive trading pro-tools on