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
idunnomuch IS this working in the latest version of prorealtime? I get the indicator, but not over my c...
bernardmorel egalement apparait en dessous du graphique mais vide
bernardmorel Bonjour est t il possible de remettre en ligne the strat car il y a une indication qui d...
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
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.
ferros bonjour , super votre indicateur!!!! est-il possible de l'avoir en histograme +1 /-1 por en...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Guillaume Mcm I gave the above message fix ;)
Tradingrob Is it possible to put the itf-file in the right way here in Prorealcode? so the right 'trend...
Guillaume Mcm Update link ;) https://www.prorealcode.com/topic/trend-histogramme-cci-mise-a-jour-suite-...
Screw27 Hi man, I installed the indicator and i don't know why but my graph it is so big
HelixKing sounds interesting I'll take a look
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...
Screw27 Salut nicolas j'aimerais savoir tes résulats grace a cettte methode
eva.g.forsgren It dose not work, I get a strap instead of candels???????????????????????????????????????????
Nicolas That indicator is the one below the chart. The indicator to put on the price chart is this o...
pyhrus P.S : IG , que j'ai contacté ,m'indique que la version V11 , ne sera pas disponible avant un...
Hasardeur Dear Nicolas, is there someting at the arry to modify in order to run the trend at the actu...
MALIMALO Dear Nicolas, just try touse your indicator with backtest but it's not working. is anybody...
ribes65 Bonjour Nicolas, Merci pour votre travail. Est-il envisageable de créer un screener pour ...
Nicolas Bien sûr, merci de formuler une demande dans le forum des screeners pour prorealtime. En res...
ipbvba Est il possible de le transformer en indicateur (pour ne plus avoir les lignes mais uniqueme...
supertiti Bonjour Nicolas, Je ne comprend pas bien , le trend change de couleur quand les prix sont a...
Nicolas Oui ce serait possible, cependant l'indicateur est bien prévu pour conserver la couleur de l...
supertiti Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades cou...
Nicolas How to import file page: in the help section of the website explains howto
kenssa import through the indicator page/window in the Proreal time
chicoteca Buenas, no consigo que se me muestre en el chart de DAX. ¿Cómo procedo? Gracias.-
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
Stockastiss Can this code be simply transferred into Backtestingcode so one doesnt need to use call ? (i...
Vonasi Sorry for the late reply. Add the code to your strategy and remove line 5 and line 39. Chang...
viktorthunss Hi! How many averages are there? Can I see the somewhere?
leofi https://www.prorealcode.com/topic/simple-average-with-visual-color/
leofi Go visit www.prorealcode.com/topic/simple-average-with-visual-color/ and watch 2em post
Dritan Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate wind...
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...

Top