OPEN-SOURCE SCRIPT

Pragmatic risk management

Updated
INTRO
The indicator is calculating multiple moving averages on the value of price change %. It then combines the normalized (via arctan function) values into a single normalized value (via simple average).
The total error from the center of gravity and the angle in which the error is accumulating represented by 4 waves:

BLUE = Good for chance for price to go up
GREEN = Good chance for price to continue going up
ORANGE = Good chance for price to go down
RED = Good chance for price to continue going down

A full cycle of ORANGE\RED\BLUE\GREEN colors will ideally lead to the exact same cycle, if not, try to understand why.

NOTICE-
This indicator is calculating large time-windows so It can be heavy on your device. Tested on PC browser only.

My visual setup:
1. Add two indicators on-top of each other and merge their scales (It will help out later).
2. Zoom out price chart to see the maximum possible data.
3. Set different colors for both indicators for simple visual seperation.
4. Choose 2 different values, one as high as possible and one as low as possible.
(Possible - the indicator remains effective at distinguishing the cycle).

Manual calibration:
0. Select a fixed chart resolution (2H resolution minimum recommended).
1. Change the "mul2" parameter in ranges between 4-15 .
2. Observe the "Turning points" of price movement. (Typically when RED\GREEN are about to switch.)
2. Perform a segmentation of time slices and find cycles. No need to be exact!
3. Draw a square on price movement at place and color as the dominant wave currently inside the indicator.

This procedure should lead to a full price segmentation with easier anchoring.
Release Notes
Change bar color based on most dominant wave.
Release Notes
Update script to V5
Centered OscillatorsOscillatorspragmaticprime

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer