OPEN-SOURCE SCRIPT

Price Action in action

Atualizado

What?

Price Action in Action is an indicator to help Price Action learners and practitioners to get everything related for Price Action in one place.
Price Action is:
Price + Volume = Action

In this indicator, we have the following features available:

Support/Resistance

Using the RSI with different periods in a multiple of 7 (7, 14, 21, 28), we first determine the overbought (above 70, customizable) and oversold (below 30, customizable) regions. Then we pick up the highest point and lowest point in the RSI values in the overbought and oversold regions, respectively. These are the point, historically supply/demand emerged for surety to push down/up the RSI indicator and the corresponding price. So, these are the most accurate way, we believe, to draw support/resistance (or demand/supply) in the chart. By default, the Support is green color and Resistance is red color. To give a visual representation, we differentiate the different shades of green and red. For example, for Level-1 (i.e. 7 by default) we use the darkest shade (0 transparency) and Level-4 (i.e. 28 by default) we use lighter shade (60 transparency). Note please: you can customize the color of support and resistance lines (say if you want resistance as green and support as red). The respective shades (transparency) will be automatically adjusted accordingly. But those shade (transparency) levels are not customizable, they are fixed (please bear with it for version-1 at least).


Strength of Support/Resistance

In the chart above/below the Resistance / Support lines you can see the tiny labels with some numbers like 1, 2.
We found out how many times a particular support/resistance is appearing across multiple RSI periods. E.g. if price P1 appears 2 times among 4 different RSI periods, the number will be 2 for that calculation, and so on.
There can be multiple presence of these numbers in a support/resistance line (i.e. multiple tiny labels). Something like: 1, 1, 2 (into different candles). This means the same support/resistance is tested so many times in different occasion (means there is a RSI max/min coincides in this level over multiple occasions) at different candles.
This will help you to intuitionally gauge the “strength” of a support/resistance line.
The more the marrier, unworthy to mention.


Candle Stick Patterns

Well: we don’t need to tell anything about the Candlestick. All of you know it better than us. And it’s a time proven, zero-lag mechanism to judge the Price-Action is unfolding in the market. We do not know if there is anything better possible than this time tested patterns to judge the prevailing sentiments of market.
Price-Action does not complete without finding out the Candlestick Patterns correctly.
And in this indicator your will get all of these: Single Candle such as Doji (default off), Marubozu, Spinner, hammers, inverted-hammer etc. ; 2 candles like Tweezer, Inside Candle, Engulfing; 3 candles like morning star/evening star.
In the multi candle patterns (2/3 candles), we are grouping the candles with a dotted rectangle such that it is clear which 2/3 candles are part of the pattern. E.g. Morning Star: 3 candles are grouped in a dotted rectangle and the Morning Star label will come to the latest candle (3rd most – as the pattern is detected reliably only on the completion of the 3rd final candle).
Of course, any program can not eliminate your trained eyes and brain to capture the patterns. But we have provided sufficient knobs to adjust various parameters to tweak the candle-pattern detection. Such as Strict Inside Candle(Harami) Boolean knob where the whole current candle including wicks will be inside the body part of the previous big candle. For non-strict mode, the current candle just inside the previous candle, possibly by wicks.
To make it better usable, for every such knobs (which are not obvious) we have added user-friendly tooltip (just mouse hover the question mark (?) besides the control/switch). There are plenty of it.


Volume

Here we have a rudimentary (yet effective) way to judge the volumes.
We find out the Volume Weighted Moving Average (VMWA) of the 20-period (default, but customizable) and the latest volume. If the latest volume is more than the 20 period vwma, we just add a grey diamond on the top of the candle to denote it’s attracting volumes. Of course, we provide a Weight coefficient (default is set to 1). So if the current bar’s volume on bar’s completion is more than the 20 period volume vmwa times the weigh-cofficient, we mark it with a tiny grey diamond.


Points to be noted:

  • In all places we mark the indication only on the completion of the bar (technically speaking we have checks, as far as possible, with barstate.isconfirmed). However, if you wish, you can turn it off for Candlestick (as some experts may want to check candlestick on the real time, even before the closing of bars).
  • In case if you see the chart looks cluttered (because of many information, specially in smaller timeframes like 5 min), there are controls given in the settings to toggle each and every features.
  • By default, we turn off Doji candles (all 3 types of Doji’s – normal, Gravestone & Dragonfly) as they are mainly indecision. However, you can toggle it to turn it on.
  • It does not give you any Buy/Sell call. The interpretation it does not have.




Why?

What’s unique in it?


  • As we already mentioned our intention is to include Price (in forms of Support / Resistance), Volume and Action (sentiments in terms of Candlestick patterns) into a single place. And so far, to the best of our knowledge, we could not come across a single indicator provides all of these.
  • There were works available to determine the RSI based support / resistance zones. Those are great piece works at that time (lets say 3 years back when PineScript was in earlier versions). To the best of our knowledge those does not cover up finding out the lowest / highest point of RSI and the corresponding price to get the simplistic and distinct support/resistance lines.
  • We have the intuitive support/resistance strength included which we could not found out in current set of available indicators.
  • To the best of our knowledge, there seems no indicator can detect 3-candle patterns which are extremely popular to detect trend reversals (such as Morning Star or Evening Star). Moreover for the multi-candle patterns we are grouping the candles part of the pattens (2-candles or 3-candles) using a dotted rectangle such that it’s visually clearly (and a well educative material for Price-Action learners also).




Mentions:

There are many works which inspire us along the way. Honestly: we sometimes forgot which all indicators we experimented with. We are sincerely apologetic in case we forgot to mention. A few note-worthy:
  • There is an indicator from user “repo32” named as “Candlestick Patterns Identified (updated 3/11/15)”. (We could not be able to contact “repo32”). We are inspired from his work that it’s feasible to detect Candlestick patterns.
  • There is an awesome work done by “RSI Based Automatic Demand and Supply” by user “shtcoinr”. The idea of consulting multiple RSI levels to find out the demand/supply zone we inspired from him. (We did contact “shtcoinr” and got his kind permission to use the concept.)


We are greatly thankful to these abovementioned wizards for their pioneering a-prior work in this front.

And of course, this TradingView platform to provide this abstraction, facilitates and felicitates collaborative contributions.



Ultimately, what’s for you?

That’s the main question. What’s for you?

Price-action comprises of following 3 tasks (at least):
  • Draw support/resistance lines in the chart.
  • Once price reaches at the support/resistance line, you fervently look out the candles’ formation to mentally map to the candle patterns. Your aim is divine: You want to judge if the price-action will continue or take a rejection/reversal.
  • Then you double-confirm with the volume (in a non-overlaid chart below).
  • Finally take a trade.



For a price-action newbie or seasoned, expert practitioner, you must be doing all the above tasks regularly and manually, in a mechanical, mundane way. There come the humanly subjectivity & the inevitable emotions. This indicator, being a piece of program/code in PineScript latest version v5 , eliminates (or at least, reduces to a great extend) that subjectivity & emotions out of the way of decision making. Thus resulting better yield.

Of course, you can argue that you draw slanted trend lines also. We recommend an already existing indicator by user LuxAlgo named as “Trendlines with Breaks [LUX]”, if you wish so.


Disclaimer:

  • This piece of software does not come up with any warrantee or any rights of not changing it over the future course of time.
  • We are not responsible for any trading/investment decision you are taking out of the outcome of this indicator.



Happy trading.

Notas de Lançamento
Added two convenient toggles to turn off the RSI based support/resistance and Candlestick.

Usecase: In the evening, you may just want to get a feeling of next day's levels. So you just turn off the candlestick and only get the support/resistance. Done with your levels. Most likely you will prefer to choose a higher timeframe (say 30 mins or hourly).

During day time trading, you have the support resistance already drawn in higher timeframe. You fall back to your favorite lower timeframe (3m/5m), turn off the RSI (i.e. support/resistance) and only watch the candlestick patterns to take a trade decision.
Notas de Lançamento
Some minor defects fixed. E.g. when someone does not want to see candles still the box was coming, now fixed.
No major functional update, only defect fixings.
Notas de Lançamento
Added a flag to hide away the Support/Resistance line strength. Default behavior is: Show Strength.
Candlestick analysiscandlestickpatternindianstockmarketpriceactionanalysisRelative Strength Index (RSI)supportandresistancezonestrendlinetradingvmwaVolume

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal