Price Action Index

I've created a simple oscillator which I think does a good job of easily showing you when price is worth watching or not. I think all too often you get stuck looking at something like an RSI and end up trading noise.

From my observations and experiences, I've found that there are 2 major catalysts for price movement--
  • Price is either trending and reaches a top or bottom, or
  • Price is consolidating and ready to make a move in some direction

These movements can be seen quite well from a Bollinger Band , which is what mostly gave me the inspiration. When I watch a chart with a BB on it I see that either you're looking to trade price moving out of a squeeze or riding price up/down the band until it crosses over and makes a move to the moving average.

My solution was to multiply the direction of price by the strength of its deviation.
  • Price gets converted into a signal between -1.0 (bottom of the range) and 1.0 (top of the range)
  • Standard Deviation gets converted into a stochastic signal between 0 (next to no deviation from mean) and 100 (highest deviation in lookback)
  • These 2 get multiplied by each other
  • The result tells you if price action is trending bullish and if its approaching max strength (perhaps Overbought), example: Price is hitting highs (1.0) and deviation is also at its highest (100) = 100, opposite for bearish
  • Result can also tell you if price is at the top of the range but the deviation is so tiny and we're mostly pinned to the mean (1.0 * 5 = only 5)

How to Trade this Indicator--
If the indicator is stuck near the middle and purple:
- Don't make directional trades or you'll be eaten alive by the chop
- Good idea to sell options, Iron Condors/Butterflies, etc
- Wait for a move to breakout --> the purple will fade away and give way to a direction
--- As in all trading scenarios, be mindful of fakeouts/short moves to one direction that very quickly get reversed

If the indicator is heading higher:
- This would indicate there is a bull trend going on, get long
- If we are reaching the overbought area, this is an ideal place to take profits or look at spreads like Bearish Call Spreads (sell calls)
- I think you can make your own determination of when to sell by either selling when we're in the overbought area (if it reaches there) or staying bullish so long as it is above the zone

If the indicator is heading lower:
- Bear trend, shorting is possible
- Can use this as a contrarian signal to buy lows

A couple of charts with the indicator and a purple squeeze box I've drawn (can sometimes get noisy in real-time, but hindsight is 20/20)--
Bitcoin on Daily with default 20 length

Gamestop on 30 minute time frame with 100 length

Please feel free to use this indicator for your trading or your own indicators. This particular script is very stripped down/bare bones from what I have been working on as an ongoing project. If TradingView ever returns scripts you can sell, I would probably open that up for a small premium.
릴리즈 노트:
  • Added ability to separate the Standard Deviation length from its Stochastic length
  • Added ability to adjust the "straddle box" as I like to call it
릴리즈 노트:
  • Added some other options besides Standard Deviation to measure dispersion

Personally, I really like the Signal to Noise ratio squared, Coefficient of Variation, and Standard Deviation. StDev is probably the most simple measure and the default. These additions are mostly just an add for fun, but if you find better signals or trading using different ones, then great!
릴리즈 노트:
  • Added Higher Time Frame functionality. I haven't seen much improvement in signals, I think what makes more sense is increasing the lengths instead, but some might find it more useful
  • Added ability to use Bar Colors
  • Added alert conditions and alerts-- I personally have not scripted these before and wasn't able to get any real-time alerts generated, so I am not sure this is done correctly... will likely revisit at another time
  • Found a small typo in the oscillation tuple function
  • Added a Range function to Dispersion methods

Have worked on variable/dynamic lengths, using On Balance Volume, Rates of Change, etc. but haven't seen a lot of improvement in signals, and getting to be a little too complicated for the basis of the script.

If you have any requests or additional feedback, please let me know!
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


Cool script
+1 응답
chrism665 vonnyhurt
@vonnyhurt, Thank you!
Are the colored boxes supposed to show up in both panes? I only get the lower pane.
+3 응답
chrism665 ckwhipple
@ckwhipple, The boxes are set to show colors based on whatever the price action is doing-- top box will highlight red when we get above a threshold, middle box highlights purple/fuchsia when stuck in the mid-range, and bottom box highlights lime when its below a threshold. I set these based on how I like to trade, which is that I am always looking to sell/take profit at high points, and buy lows for sharp reversals up, hence red at the top, green at bottom. Feel free to modify script in Pine to your liking.
+1 응답
ckwhipple chrism665
@chrism665, Thank you for your clear and helpful explanation. I understand the oscillator on the lower pane. However, I was asking about the purple/fuchsia boxes on the actual price chart. I was wondering if those are painted automatically or if you drew those onto the stock chart separately as an illustration. Thanks.
+1 응답
chrism665 ckwhipple
@ckwhipple, Ah, got it! I drew those boxes manually to help drive home the indicator's usefulness.
Hello, thank you for the script looks awesome. Just had a question what is the function of the Repaint HTF function in the indicator? Thank you in advance.
+1 응답
@ajmann, "Repainting" is a lengthy explanation, I wrote a few things and deleted them several times within this comment, I just don't want to butcher it and get smacked by TV Mods. I would suggest reading up these pages for an 'official' explanation--

It's not something I am uniquely doing, the Repainting function has become a mainstay in TradingView indicator scripts that use Higher Time Frames.
I really love it. Thanks a lot
+1 응답
a very intuitive and useful script. Thanks dear
+1 응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 정보 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터
프로화일 프로화일설정 계정 및 빌링 리퍼드 프렌즈 코인 나의 서포트 티켓 헬프 센터 비밀메시지 채팅 로그아웃