已更新

Moving Average Crossover Strategy [everget]

27 706

在Trading Toolkit获取此指标及其他专属指标

此策略属于everget的“付费空间”。订阅(费用:$5.00/月)即可在您的图表上使用该策略,并获取作者提供的其他独家指标。您可直接在 TradingView 上完成支付,并立即获得使用权限。

探索Trading Toolkit
Hello friends,

This is a comprehensive backtesting engine for Moving Average crossover strategies, supporting over 63 types of moving averages and filters. It allows you to test, compare, and optimize crossover behaviors between any two moving averages with flexible profit and risk management tools.

Built upon the Moving Average Crossover foundation, this advanced version lets you manually backtest more than 4096 combinations of moving average types. When combined with customizable periods, take-profits, and stop-loss levels, the total number of possible configurations becomes virtually unlimited.

🛠 How It Works

The system tests crossovers between two selected moving averages, with full control over their types, lengths, and trading direction. Integrated bracket settings enable dynamic take-profit, stop-loss, and trailing-stop management using units such as %, ATR, points, pips, or ticks.
You can restrict backtesting to a custom date range for focused performance evaluation or run it across the instrument’s full history.

🔥 Key Features
  • Supports 63+ moving average and filter types — including algorithms by Ehlers, Jurik, Kaufman, Apirine, Tillson, and Dürschner
  • Customizable MA types, periods, and strategy direction
  • Full-featured bracket control: TP, SL, and TSL in ATR, %, points, pips, or ticks
  • Backtest window customization (start, end, or range)
  • Direction filter: Longs only, Shorts only, or Both
  • Dynamic trade labeling and color-coded visualization
  • Option to exit only at TP, SL, or TSL
If you'd like access or have any questions, feel free to reach out to me directly via DM.

👋 Good luck and happy trading!
版本注释
  • Added six moving average types - Hampel Filter (HF), Moving Median (Median) and four Jurik MA Surrogates (JMAS1 to JMAS4) - for 69 in total
  • "JMA" is now a faithful port of Mark Jurik's original algorithm, so its line, crossovers and backtest results can differ slightly from the previous version. The approximation used before stays available as JMAS1 to JMAS4
  • Both type inputs now carry a tooltip that explains every abbreviation
  • Breaking: "Exit Only at TP | SL | TSL" is replaced by "Exit on Opposite Signal", which has the opposite meaning and is off by default. An opposite crossover closes or reverses an open position only while it is switched on
  • Breaking: brackets are now enabled by default - a 3 ATR Take Profit and a 1.5 ATR Trailing Stop - where previously all three were off
  • With "Exit on Opposite Signal" on, an opposite crossover now closes the position even when Trade Direction does not allow the opposite side
  • Take Profit, Stop Loss and Trailing Stop are now placed together with the entry, so the position is protected from the bar it opens on. Previously the first bar of every trade had no stop or target
  • Bracket levels are now measured from the signal bar's close, so they match the Moving Average Crossover indicator
  • When a crossover closes or reverses a position, its Take Profit and Stop Loss orders are now cancelled, so they can no longer fill on the same open as the exit
  • Added the "Stdev" bracket unit with its own period, and the "Price" unit for Take Profit and Stop Loss
  • "R/R Ratio" targets are measured from the stop the position opens with: the tighter of Stop Loss and Trailing Stop, or whichever one is on
  • Stop Loss and Trailing Stop now resolve to a single protective stop, so only one of them fires
  • Order fills now carry alert messages (entry, exit on cross, TP, SL, TSL) for "Order fills only" alerts
  • Fixed: outside the Backtest Window, exit orders were placed again right after all orders had been cancelled
  • UI: added a configurable table showing position, entry, brackets, colour-coded Open P&L and setup warnings
  • UI: brackets are now compact enable / value / unit rows that grey out while switched off, and "Strategy Direction" is renamed to "Trade Direction"
  • Performance and reliability work throughout: shared libraries, and entries that wait until ATR and Stdev have enough history

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。