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
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...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Nicolas
5 years ago
Bateson Merci pour la réponse Nicolas. C'est bien ce que j'ai fait mais ça ne fonctionne toujours pa...
Enzo Paliotti Veramente ottimo, era quello che cercavo, si potrebbe modificare inserendo come variazione a...
Nicolas Perché no, chiedetelo con una descrizione dettagliata nel forum degli indicatori, per favore!
jiddan78 how to convert to afl amibroker ?
Nicolas We do not supply free coding assistance for AFL Amibroker on the website. You can ask for pa...
Ngomsi @ Vonasi, how to use timeframe , 13 minutes ,21 minutes, 34 minutes,et 55 minutes with this...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Dari when I put the indicator does not put it on the price, sn in a new box like many indicators....
Nicolas by adding it on price instead. Use the wrench on the left upper side of your price chart.
coscar Ottimo lavoro. come sempre!
luxrun Nello studio di Sepiashvili viene descritto anche un altro indicatore, il Q-indicator, che è...
Kris75 Hi, This is great !! anyone ever developped a strategy about it ???
swapping hello Kris75, not that I know but it is possible to make a scenario ;)
digitation Hi swapping, Thanks for sharing this useful tool. I was wondering how difficult it would be...
AlexWoe89 Hi, thanks for the code. Do you have an idea, if you can also draw pre-market data on char...
Thomas Hello swapping. Very good idea. Can I use and modify the code? I would like to add a few mor...
Razz Hello swapping the indicator is very good! Can you tell me how I can add 2 lines in the dist...
swapping Hello wanjpt, I do not see how to do it because the calculation is for 12 candles of 5mn onl...
wanjpt Thanks swapping.
Thomas @wanjpt https://www.prorealcode.com/prorealtime-indicators/opening-range-eur-with-close-and...
Maik2404 wie kann ich den Code bekommen Paul?
jens_kittner Works with US Crude at 1h as well!
Jean-Claude REGIS Je préconise de regarder les graphiques H1 et M15 pour visualiser la tendance de fond et d'...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
Nicolas
6 years ago
BSTrend
v10.3
BSTrend
10
Indicators
Florian Legeard C’est à dire sur le prix et non sur le temps ? Merci
Rohit82189 bstrend repaints
Nicolas No, it doesn't repaint.
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...
Nicolas
6 years ago
Maxime Baudin Interesting, Thank you! :)
franck-david Bonjour Nicolas , actuellement je me forme grace a vos videos tres tres bien expliques mer...
Nicolas Merci. ça n'est pas le lieu pour poser ce genre de question :) Merci d'utiliser le forum Pro...

Top