OPEN-SOURCE SCRIPT

Octopus Nest Strategy

Updated
Hello Fellas,

Hereby, I come up with a popular strategy from YouTube called Octopus Nest Strategy. It is a no repaint, lower timeframe scalping strategy utilizing PSAR, EMA and TTM Squeeze.

The strategy considers these market factors:
PSAR -> Trend
EMA -> Trend
TTM Squeeze -> Momentum and Volatility by incorporating Bollinger Bands and Keltner Channels

Note: As you can see there is a potential improvement by incorporating volume.

What's Different Compared To The Original Strategy?
I added an option which allows users to use the Adaptive PSAR of loxx, which will hopefully improve results sometimes.

Signals
Enter Long -> source above EMA 100, source crosses above PSAR and TTM Squeeze crosses above 0
Enter Short -> source below EMA 100, source crosses below PSAR and TTM Squeeze crosses below 0

Exit Long and Exit Short are triggered from the risk management. Thus, it will just exit on SL or TP.

Risk Management
"High Low Stop Loss" and "Automatic High Low Take Profit" are used here.

High Low Stop Loss: Utilizes the last high for short and the last low for long to calculate the stop loss level. The last high or low gets multiplied by the user-defined multiplicator and if no recent high or low was found it uses the backup multiplier.

Automatic High Low Take Profit: Utilizes the current stop loss level of "High Low Stop Loss" and gets calculated by the user-defined risk ratio.

Now, follows the bunch of knowledge for the more inexperienced readers.

PSAR: Parabolic Stop And Reverse; Developed by J. Welles Wilders and a classic trend reversal indicator.
The indicator works most effectively in trending markets where large price moves allow traders to capture significant gains. When a security’s price is range-bound, the indicator will constantly be reversing, resulting in multiple low-profit or losing trades.

TTM Squeeze: TTM Squeeze is a volatility and momentum indicator introduced by John Carter of Trade the Markets (now Simpler Trading), which capitalizes on the tendency for price to break out strongly after consolidating in a tight trading range.

The volatility component of the TTM Squeeze indicator measures price compression using Bollinger Bands and Keltner Channels. If the Bollinger Bands are completely enclosed within the Keltner Channels, that indicates a period of very low volatility. This state is known as the squeeze. When the Bollinger Bands expand and move back outside of the Keltner Channel, the squeeze is said to have “fired”: volatility increases and prices are likely to break out of that tight trading range in one direction or the other. The on/off state of the squeeze is shown with small dots on the zero line of the indicator: red dots indicate the squeeze is on, and green dots indicate the squeeze is off.

EMA: Exponential Moving Average; Like a simple moving average, but with exponential weighting of the input data.

Don't forget to check out the settings and keep it up.

Best regards,
simwai

---

Credits to:
Release Notes
Removed Emoji from the title and short title
Replaced EMA by an HTF EMA (this is also different from the original behaviour and not optional, EMA from HTF is way more effective than EMA of the current timeframe.
Release Notes
Fixed wrong signal processing
Release Notes
Added TTM Squeeze/Squeeze Momentum histogram visualization on EMA
Updated default position size
Updated screenshot
Release Notes
Updated label position
Updated screenshot
Release Notes
Added the original Squeeze Momentum algorithm of LazyBear
Fixed repainting (It is chooseable now, if you want repainting or not.)
Added resolution selection
Release Notes
Updated screenshot
Updated license
Release Notes
Updated license
Release Notes
Cleaned up the code a little bit
Release Notes
Cleaned up the code a little bit
Release Notes
Fixed bar_index bug
adaptiveehlersfilterhighlowKaufman's Efficiency Rationo-repaintriskmanagementstrategysignalsstatisticsstrategyTrend Analysisyoutube

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