Mean Reversion Oleg — Strategy by olegask68

By olegask68

Performance Metrics

Description

📘 DescriptionThis script is an extended and customized version of the original “Mean Reversion V‑F” created by the respected author fullmax.I adapted the logic for my own trading workflow and added several improvements aimed at stability, automation, and exchange‑safe execution when using webhooks.🔧 Key EnhancementsLot precision control (prevents exchange errors when sending webhook orders)Base order labels for visual clarityMini‑table with live position metricsDynamic deviation levels (L1–L5)Static averaging levels (B2–B5)Trailing take‑profit optionSupport for stock mode (fixed units instead of quantity)Webhook fields for entry and exit signals🎯 How the Strategy WorksThe script calculates a moving average and builds five deviation‑based levels below it.When price reaches these levels, the strategy opens a base order (B1) and then averages the position using B2–B5 levels.After entering a position, the strategy manages it using:a fixed take‑profit targetor an optional trailing take‑profitplus a visual table showing position size, USD value, open PnL, and equityAll quantities are rounded according to the selected lot precision to ensure compatibility with exchange requirements when using webhook automation.⚙️ Features OverviewAutomated long entries based on deviation levelsConfigurable order sizes for each averaging stepOptional stock‑mode (units instead of calculated quantity)Dynamic and static level visualizationTrailing TP with adjustable distanceClean UI with optional labels and mini‑table📝 DisclaimerThis script is provided for educational purposes only.It does not constitute financial advice and does not guarantee profits.Always test strategies on historical data before using them in live trading.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView