Average Penetration Indicator

v10.3
Average Penetration Indicator

Thank you to Markos Katsanos and his article in the June 2018 edition of Technical Analysis of Stocks and Commodities magazine for this idea.

This indicator counts the number of times that a candles high or low penetrates a simple moving average line. The period of average and look back period can be adjusted to suit the market being traded.

The author was using an average of 100 and a look back period of 3 months. He was also only counting the number of times that the close penetrates the average line but I decided that high and low penetration gave more interesting results. On the line chart the red line is number of times the low is below the average line during the look back period and the green line is the number of times the high is above the average line. So green above red = bullish market and red above green = bearish market.

It can also be seen that when the red and green are converging that a bull run or bear run may be coming to an end. I converted the indicator into a histogram to more easily show this. The histogram switches to bullish or bearish if the lines start converging but otherwise is bullish if green is above red and bearish if the opposite.

The author calls his version his ‘Stiffness’ filter. I will let your own imagination work out why!

Both codes are included here along with ITF files to import. I recommend importing over cut and paste to get full functionality.

Share this

Risk disclosure:

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 : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Vonasi • 06/21/2018 #

    Forum discussion on these indicators can be found here: https://www.prorealcode.com/topic/average-penetration-filter/

  2. jennr29 • 06/21/2018 #

    Hi. Is it possible to convert this code to an mq4 file?

    • Nicolas • 06/21/2018 #

      Sorry but our website is dedicated to prorealtime programming. However, you can ask for private coding job here: https://www.prorealcode.com/trading-programming-services/

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar
Related users ' posts
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
JohnScher Postscript: It's running in the live right now. One position after the other is opened. ...
ullle73 nice!! how's it been since your last post on going live? :)
thomas2004ch Hi, Is this strategy suitable for daily SPY? Regards
AndPar Buongiorno Nicolas, vorrei provare questo indicatore, ma quando lo inserisco in PRT mi vengo...
Nicolas Basta aggiungerlo al prezzo https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-i...
Aragorna hello Nicolas, this indicator works with the last Beta version of PRT? Ive seen tha many in...
Dest
2 years ago
DIDI Index
DIDI Index
0
Indicators
wally Hola soy nuevo en el mudo robots. Alguien seria tan amable de poner el archivo itf.file ya q...
Darren Nash I found this works well on the DOW
thomas2004ch Hi John, Is your strategy suitable for daily SPY? Regards
KAMJKAZE thanks, really interesting!
2c95 thanks, why do U prefer average than lowest ? to close under average does'nt mean another...
Stenozar Hi Sever, how can I visualize the coloured areas?
Sever Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set ...
ChemaGeek Bonjour Nicolas, j'ai récemment découvert cet indicateur (Regularized Momentum 2017) et je l...
YvesRobert Bonjour, nouveau sur PRT (qq jours), j'essaie un peu de voir quel type d'indicateur me convi...
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
Boris Hi IVMcm, thanks for your amazing work. I have tested all of your indicators and use some of...
IV Mcm With pleasure and thanks!
ashiash how to use this indicator can i use tradingview platform
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
Maxime Baudin Super travail !
Yanic c'est top j'adore
Maxime Baudin Merci l'ami, passe une bonne semaine
IV Mcm Merci de même ;)
Nicolas C'est dans ce sujet: https://www.prorealcode.com/topic/trendline-une-approche-du-trading/ M...
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
IV Mcm The use of this indicator is however logical, it gives you potential movement departures dep...
Nicolas The updated version (v2) is available to download and discuss in this forum thread: https://...
IV Mcm Thanks Nicolas
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
IV Mcm Vous devez faire un clic droit sur le prix > propriété > ajouter indicateur Si vous...
punch1 Fonctionne pas chez moi il s'affiche rien pourtant j'ai bien fait le clic droit sur le prix ...
punch1 Je peux te faire un screen d'ecran si tu as un email :)

Top