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/
受保護腳本
該腳本是閉源發佈的,您可以自由使用。您可以把它加入到常用以在圖表上使用它。您無法查看或修改其原始碼。
免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?