IronCasper

Momentum Strategy [MA Crossover + Squeeze Release + Alerts]

This is a Strategy with associated visual indicators and Buy/Sell/Close Alerts for the Squeeze Momentum Indicator.

Development Notes
-------------------------
This is a fork of LazyBear's Squeeze Momentum Indicator histogram with an added moving average crossover for multiple trade signal confirmation. Functionality for Multi-Timeframe Resolution was also enabled and code was updated for PineScript v4 compatibility.

Strategy Description
-------------------------
Enter trade when the active crossover period (identified by background crossover indicator/zone) correlates with a squeeze release (black to gray cross along midline). BUY Long if momentum in uptrend or SELL Short if in downtrend. Close trade when momentum reverses.

Alerts configured for entering Long/Short position and to Close order.

Designed to have only one open long or short position at a time (no pyramiding) with an associated close order for each.

Indicator Visuals
--------------------
  • Crossover zone background (green or red) based on last crossover direction (only buy orders are triggered in a buy zone and sell orders in a sell zone)
  • Moving average crossover line matches trend (buy upwards on green and sell downwards on red)
  • Buy (green circle) and Sell (red circle) signals at the point of crossover
  • Buy (green cross) and Sell (red cross) signals at squeeze release on the midline
  • Long (green arrow) and Short (red arrow) order label when every indicator is triggered together
  • Close (purple arrow) and label when either trend or crossover zone changes

Recommend backtesting with the resolution set to current timeframe to avoid repainting; no other known repainting. There is a current bug or flaw in the script where all the Close and some of the Long and Short orders are not executed by the strategy (this doesn't affect the visual indicators, only the strategy).

Note that the provided backtest result is based on a position sizing of 10% equity with 100k initial capital. The 15-minute timeframe performed the best, with the 30-minute a close second, and 5/45-minute tied for third. Profit/loss went into the red when expanding out to 2-hours or beyond. I suspect this could be improved upon if you follow the Alerts on the oscillator versus rely solely on the strategy (due to the aforementioned issue with all entry and exit positions not being depicted).

Disclaimer
Past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script are not intended to provide any financial advice.

Script is currently protected (due to the extensive development in the strategy) to prevent the source from being copied and sold.

My Published Scripts:
www.tradingview.com/u/IronCasper/
Skyddat skript
Detta skript publiceras med stängd källkod och du kan använda det fritt. Du kan ange den som favorit för att använda den i ett diagram. Du kan inte visa eller ändra dess källkod.
Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?