OPEN-SOURCE SCRIPT
Mean Reversion Oleg

📘 Description
This 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 Enhancements
Lot precision control (prevents exchange errors when sending webhook orders)
Base order labels for visual clarity
Mini‑table with live position metrics
Dynamic deviation levels (L1–L5)
Static averaging levels (B2–B5)
Trailing take‑profit option
Support for stock mode (fixed units instead of quantity)
Webhook fields for entry and exit signals
🎯 How the Strategy Works
The 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 target
or an optional trailing take‑profit
plus a visual table showing position size, USD value, open PnL, and equity
All quantities are rounded according to the selected lot precision to ensure compatibility with exchange requirements when using webhook automation.
⚙️ Features Overview
Automated long entries based on deviation levels
Configurable order sizes for each averaging step
Optional stock‑mode (units instead of calculated quantity)
Dynamic and static level visualization
Trailing TP with adjustable distance
Clean UI with optional labels and mini‑table
📝 Disclaimer
This 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.
This 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 Enhancements
Lot precision control (prevents exchange errors when sending webhook orders)
Base order labels for visual clarity
Mini‑table with live position metrics
Dynamic deviation levels (L1–L5)
Static averaging levels (B2–B5)
Trailing take‑profit option
Support for stock mode (fixed units instead of quantity)
Webhook fields for entry and exit signals
🎯 How the Strategy Works
The 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 target
or an optional trailing take‑profit
plus a visual table showing position size, USD value, open PnL, and equity
All quantities are rounded according to the selected lot precision to ensure compatibility with exchange requirements when using webhook automation.
⚙️ Features Overview
Automated long entries based on deviation levels
Configurable order sizes for each averaging step
Optional stock‑mode (units instead of calculated quantity)
Dynamic and static level visualization
Trailing TP with adjustable distance
Clean UI with optional labels and mini‑table
📝 Disclaimer
This 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.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.