Weighted Price Action

Weighted Price Action

This indicator counts the number of times eight different price action events occur in the last p bars. It then gives more weight to recent price action events and less to earlier price action events.

The price action events it counts are:

  • close > open
  • high > previous high
  • low > previous low
  • close is in top half of candles range
  • close < open
  • high < previous high
  • low < previous low
  • close is in bottom half of candles range

Two lines are drawn. The green line represents weighted upward price action and the red line weighted downwards price action. The lines are drawn from a datum of whichever line has the lowest value so that is can easily be seen which type of price action has been most dominant recently.

Weighted average lines with a period of half p can also be drawn. These smooth out the indicator returns but also add some lag.

You can choose which of the two lines are displayed by ticking or un-ticking ‘Lines’ and ‘Averages’ in the indicator window.

It is also possible to remove any of the price action events from the calculation by ticking or not the relevant box.

If the green average line is rising from zero then it indicates an increase in recent long price action and bulls have been on top of bears. If it starts falling then the bulls are losing control.

If the red average line is rising from zero then it indicates an increase in recent short price action and bears have been on top of bulls. If it starts falling then the bears are losing control.

As with all my indicators I advise downloading and importing the ITF file 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. Wilko • 09/06/2019 #

    Thanks for the idea!
    This type of scoring can really help in not only identifying regimes in isolation, but also to rank eg different stocks as to how bullish price action is. It is in relative comparisons that these types of ranking systems really show their value!

    Nice bit of code!

  2. Vonasi • 09/06/2019 #

    Thanks for the compliments Wilko.

  3. jissey • 09/06/2019 #

    Il manque des infos comme la définition de P et de lines ,où peut-on les trouver? Merci cdlt

    • Vonasi • 09/06/2019 #

      Download the ITF file and import it as tells you to do in the indicator description. Do not cut and paste the code.

  4. Globalmarkets79 • 09/06/2019 #

    What is the price of p and j?

    • Vonasi • 09/06/2019 #

      p can be any look back period you want. If you downloaded and imported the indicator as suggested in the description then you can set the p value in the indicator settings window, j is a value calculated within the code so you don’t need to set it to anything.

  5. Globalmarkets79 • 09/06/2019 #

    Thank you Vonasi for the answer. I have an other question. When i tried to run the indicator i had a message that variable “lines” is underfined. Please can you explain the variable “lines”?

    • Vonasi • 09/06/2019 #

      Lines is either 0 or 1 to turn on or off the drawing of them. Once again if you download and import then ‘Lines’ should be an option in the indicator settings window.

  6. Globalmarkets79 • 09/06/2019 #

    Thank you Vonasi, this indicator is very helpful!!!

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
2 weeks ago
groelandes Cuando te descargas el fichero itf, en su código no aparece toda la configuración de alertas...
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
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.
Iván
2 months ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
2 months ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
Iván
3 months ago
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
9 months ago
B-Xtrender
B-Xtrender
8
Indicators
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...
JS
9 months ago
Trendilo
Trendilo
0
Indicators
Nicolas
9 months ago
Anthony2A Bjr, j ai des erreurs sur la ligne 69, 74, 78 et 80. sur drawcandle drawtext et endif. si ...
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
11 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!

Top