OPEN-SOURCE SCRIPT

Mean Reversion Pro Strategy [tradeviZion]

Обновлено
Mean Reversion Pro Strategy [tradeviZion]: User Guide

A mean reversion trading strategy for daily timeframe trading.

Introduction

Mean Reversion Pro Strategy [tradeviZion] is a technical trading system that operates on the daily timeframe. The strategy uses a dual Simple Moving Average (SMA) system combined with price range analysis to identify potential trading opportunities. It can be used on major indices and other markets with sufficient liquidity.

The strategy includes:
  • Trading System
  • Fast SMA for entry/exit points (5, 10, 15, 20 periods)
  • Slow SMA for trend reference (100, 200 periods)
  • Price range analysis (20% threshold)
  • Position management rules

  • Visual Elements
  • Gradient color indicators
  • Three themes (Dark/Light/Custom)
  • ATR-based visuals
  • Signal zones

  • Status Table
  • Current position information
  • Basic performance metrics
  • Strategy parameters
  • Optional messages


📊 Strategy Settings

Main Settings
  • Trading Mode
  • Options: Long Only, Short Only, Both
  • Default: Long Only
  • Position Size: 10% of equity
  • Starting Capital: $20,000

  • Moving Averages
  • Fast SMA: 5, 10, 15, or 20 periods
  • Slow SMA: 100 or 200 periods
  • Default: Fast=5, Slow=100


🎯 Entry and Exit Rules

Long Entry Conditions
All conditions must be met:
  • Price below Fast SMA
  • Price below 20% of current bar's range
  • Price above Slow SMA
  • No existing position


Short Entry Conditions
All conditions must be met:
  • Price above Fast SMA
  • Price above 80% of current bar's range
  • Price below Slow SMA
  • No existing position


Exit Rules
  • Long Positions
  • Exit when price crosses above Fast SMA
  • No fixed take-profit levels
  • No stop-loss (mean reversion approach)

  • Short Positions
  • Exit when price crosses below Fast SMA
  • No fixed take-profit levels
  • No stop-loss (mean reversion approach)


💼 Risk Management

Position Sizing
  • Default: 10% of equity per trade
  • Initial capital: $20,000
  • Commission: 0.01%
  • Slippage: 2 points
  • Maximum one position at a time


Risk Control
  • Use daily timeframe only
  • Avoid trading during major news events
  • Consider market conditions
  • Monitor overall exposure


📊 Performance Dashboard
The strategy includes a comprehensive status table displaying:
снимок
  • Strategy Parameters
  • Current SMA settings
  • Trading direction
  • Fast/Slow SMA ratio

  • Current Status
  • Active position (Flat/Long/Short)
  • Current price with color coding
  • Position status indicators

  • Performance Metrics
  • Net Profit (USD and %)
  • Win Rate with color grading
  • Profit Factor with thresholds
  • Maximum Drawdown percentage
  • Average Trade value



📱 Alert Settings
  • Entry Alerts
  • Long Entry (Buy Signal)
  • Short Entry (Sell Signal)

  • Exit Alerts
  • Long Exit (Take Profit)
  • Short Exit (Take Profit)

снимок
  • Alert Message Format
  • Strategy name
  • Signal type and direction
  • Current price
  • Fast SMA value
  • Slow SMA value



💡 Usage Tips
  • Consider starting with Long Only mode
  • Begin with default settings
  • Keep track of your trades
  • Review results regularly
  • Adjust settings as needed
  • Follow your trading plan


⚠️ Disclaimer

This strategy is for educational and informational purposes only. It is not financial advice. Always:
  • Conduct your own research
  • Test thoroughly before live trading
  • Use proper risk management
  • Consider your trading goals
  • Monitor market conditions
  • Never risk more than you can afford to lose


📝 Credits
Inspired by:
  • "Mean Reversion Trading Strategy for a High Win Rate" - YouTube channel "The Transparent Trader"
  • "Highly Reliable Mean Reversion Trading Strategy Backtested x Millions of Trades" - YouTube channel "seriousbacktester"


"Trade with Discipline, Manage Risk, Stay Consistent" - tradeviZion
Информация о релизе
📋 Release Notes

Version 2.0 - 14 January 2025
  • Added New Fast SMA Options:
  • Fibonacci-based periods: 8, 13, 21
  • Additional period: 50
  • Complete Fast SMA options now: 5, 8, 10, 13, 15, 20, 21, 34, 50

  • Bug Fixes:
  • Fixed Maximum Drawdown calculation in the performance table
  • Now using strategy.max_drawdown_percent for accurate DD reporting
  • Previous version showed incorrect DD values
  • Performance metrics now accurately reflect trading results

снимок
  • Performance Note:
  • Strategy tested with Fast/Slow SMA 50/200
  • Test conducted with 10% equity risk allocation

  • For Beginners - How to Modify SMA Levels:
  • Find this line in the code:


  • To add a new Fast SMA period: Add the number to the options list, e.g.,


  • To remove a Fast SMA period: Remove the number from the options list

  • For Slow SMA, find:


  • Modify the options list the same way
  • ⚠️ Note: Keep the periods that make sense for your trading timeframe
  • 💡 Tip: Test any new combinations thoroughly before live trading

backtestingBands and ChannelsforexstrategyhighwinratemeanreversaltradermeanreversionMoving Averagesmovingaveragecrossoverprofitabletradingstatisticsstrategytradevizion

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?


TradeVizion™
Мои профили:

Отказ от ответственности