INVITE-ONLY SCRIPT

Data Distribution with Extreme Clusters

5 979
Goal of the script:
To find extremes in financial instruments where the moves are mostly likely to end, and where conditions are good for entry points in opposite direction

How?
This is done through statistical analysis, such as calculation of extreme clusters based on calculated mean and standard deviation

Components of the script:

Upper Threshold (Red Line): This is an extreme which is shown when the financial instrument is overextended to the upside, and has a high probability of coming back down.

Lower Threshold (Green Line): This is an extreme which is shown when the financial instrument is overextended to the downside, and has a high probability of reversing and coming back up.

Extreme High Cluster (Purple Plus): This is a line (sometimes it can be a single point on a chart) that groups similar extreme prices points together.


Extreme Lower Cluster (Yellow Dots): This is a line (sometimes it can be a single point on the chart) that groups extreme low price points together.

Mean: Average Price

snapshot


How to Use the Code:

Long Side:

The code is meant to find long entries where the financial instrument is low and has a high probability of going up.

-When the price has reached the extreme low threshold (green line), the background will change to aqua blue. This is to alert you to the condition of high probability that the financial instrument will reverse to the upside (This is not a buy signal just yet, only an alert)

-You need to wait for the next candle close, where the financial instrument is no longer in the extreme low threshold range. You will see this when the background will no longer be highlighted aqua). Once you see this candle, you can enter long on the next candle to open.

snapshot

Why do we enter on the third candle?

- We enter on third candle, because we need to wait for the confirmation that the financial instrument will no longer be in extreme low threshold. We will only be sure of that, when the candle that is no longer highlighted is closed.

snapshot

-Tip: Enter long on the third candle only when the second candle is bullish and not bearish.

snapshot

snapshot

Short Side:

The code is also meant to find short entries where the financial instruments are high and have high probability of going down. Short side is similar to long side, just everything is reversed.

-When the price has reached the extreme high threshold (red line), the background will change to red. This is to alert you to the fact that the financial instrument has a high chance of reversing to the downside. This, however, is not a sell signal.

-You need to wait for the next candle to close, where the financial instrument is no longer in the extreme high threshold range. (You will see this when the background is no longer red). Once that candle is seen, you enter long on the next candle to open.

snapshot

-Why do we wait for the third candle?
Simply because we need to make sure the financial instrument is no longer at the extreme threshold. Just because it is not in extreme high threshold, the candle can still go back up and close as the extreme high threshold candle. We will only be sure that we have the non-threshold candle when the bar closes.

snapshot


Price Target (Long)

There are 2 price targets in this strategy.

1. The first target is the Mean (blue line).

2. The second target is Upper Threshold (red line)

Tip: There is a double edge sword here:

a. You can exit the position at the mean. You will get less in terms of returns, but you will also have more often winning trades.

b. You can exit at the Upper Threshold (red line). You will get more gains but your success rate will be lower because it might reverse at the mean and never reach the Upper Threshold.

c. You can use a hybrid system: get out 50% of position at the mean, and get out the other 50% at the Upper Threshold.

snapshot


Price Target (Short)

It is exact reverse of long position:

1. Exit the short position at the Mean (blue line) or

2. Exit short position at the Lower Threshold (green line)

Just as in long position, you can either take the profits at the mean, the lower threshold or use the hybrid system, where you exit 1/2 position at the mean, and exit the rest at the Lower Threshold.

snapshot


More Tips:

The code allows for a Multi-time frame analysis. To choose the time frame, just find the indicator in the upper left corner; mouse over it, and click on 3 dots that will appear. Click on them, click on settings, and find "Custom Time Frame" in the "Inputs" section. This means, you can view the indicator of a different time frame from the one you are on. For example: If you are watching a 5 min chart, you can choose to see the indicator of a 15 min. chart, or 30 min chart, etc.on the 5 min chart.


The Best combination for the Multiple Time Frame is as Follows

Chart Time Frame Being Viewed ---> Time Frame To Choose in Menu

5min ---> 15min

15min ---> 45min

1hr ---> 3hr

3hr ---> 8hr

1D ---> 1W



Choosing Higher Time Frame will expand your indicator to show the results as if you were viewing a larger time frame and will allow for you to have a better risk:reward ratio which is key to successful and profitable trading.


Choosing a stop-loss

A stop-loss is important to protect yourself against large losses. This is just a suggestion, and it can always be toggled off in the menu section if you do not want to see it on the chart. The stop is set at 1.2 ATR

snapshot

Stop Loss To Go Long

-After entering long, look for the green dot under the last extreme lower cluster circle (last yellow circle). Place the stop loss order right under the green dot.


Stop Loss to Go Short:

-After entering short, look for the red dot under the last extreme upper cluster dot (last purple cross). Place the stop loss order right above the red dot.

snapshot


Noticing the Narrow Threshold Periods:

Take note of the narrow threshold ranges. When the thresholds are close together, usually the financial instrument is setting up for a large move in upward or downward direction.

snapshot

snapshot

VERY IMPORTANT
Please remember that no indicator or script can guarantee success, and its effectiveness may change according to market conditions, as past results do not indicate future performance. Always consider your risk tolerance and investment goals before trading. Always backtest your trades to ensure that your trading is profitable before trading live.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.