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
Iván
3 weeks ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
roccafragius Hello Ivan, very good job! May I ask you to translate teh script from TradingView named Tre...
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
Regisnew très bel indicateur merci
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
elcortijoverde Gracias Iván,...sigo tus videos en Youtube. Ya estoy con la V12 y se descarga, pero algo est...
elcortijoverde Bueno, ya aparecen las velas, pero ahora, cada fin de vela aparece un nuevo pronóstico y no ...
Roger Gracias por compartir, pero no tengo ninguna predicción. @Ivan @elcortijoverde ¿qué modifica...
kats Bonjour, J'ai une question etes vous trader? Je m'explique , j'ai téléchargé tous les indi...
Faisalx Hola Ivan. Thanks for your great job. I would appreciate if you have look at my request http...
roccafragius Thank you for all these useful information!! Very great job Ivan! THank you so much
geroniman Merci Ivan, super travail. On peut toujours compter sur toi pour apporter des innovations su...
Stenozar Ciao mi restituisce errore line 1; forse è perchè utilizzo la versione 11 ? in questo caso d...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
Iván perfect!
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
8 months ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Bernard13 (Je réécris mon commentaire -français- en français car certains mots ne correspondaient pas ...
Iván 1000 indicateurs !!! brutaux
Lean Me parece muy buen indicador, y se complementa muy bien en mi sistema, ¿podrías crear un scr...
Iván Gracias! Para el screener sólo tienes que copiar el indicador y poner como condición de búsq...
Lean Muchas gracias Iván, ya lo he podido crear.
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
9 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: ...

Top