OPEN-SOURCE SCRIPT
Risk Management & Auto-Close (v6)

This strategy is a dual moving average crossover system designed for reliable backtesting and trade management. It opens trades on fast/slow MA crossovers and includes multiple built-in risk controls to ensure every trade is properly simulated in TradingView’s Strategy Tester.
Key Features:
📈 MA Crossover Logic: Choose between SMA, EMA, or WMA with adjustable fast/slow periods.
🔄 Auto Flip Positions: Automatically closes the opposite trade before opening a new one.
🎯 Risk Management: Optional take profit, stop loss, and trailing stop parameters.
⏳ Auto-Close: Forces trades to close after a set number of bars (avoids “open forever” trades).
🧪 Debug Tools: Labels, counters, and optional forced trades for testing and diagnostics.
📊 Status Table: Displays signals, trades, and net profit directly on the chart.
This makes it ideal for traders who want a clean backtest report, easy visualization of signals, and confidence that the strategy logic executes properly across different timeframes and instruments.
Key Features:
📈 MA Crossover Logic: Choose between SMA, EMA, or WMA with adjustable fast/slow periods.
🔄 Auto Flip Positions: Automatically closes the opposite trade before opening a new one.
🎯 Risk Management: Optional take profit, stop loss, and trailing stop parameters.
⏳ Auto-Close: Forces trades to close after a set number of bars (avoids “open forever” trades).
🧪 Debug Tools: Labels, counters, and optional forced trades for testing and diagnostics.
📊 Status Table: Displays signals, trades, and net profit directly on the chart.
This makes it ideal for traders who want a clean backtest report, easy visualization of signals, and confidence that the strategy logic executes properly across different timeframes and instruments.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
✨ Shared Success | Trusted Growth ✨
🚀 Profit Sharing 50/50 – Discipline & Transparency
📊 Free Signals: 👉 t.me/Forexcryptoaccountms
💼 Account Management: DM me or join the channel
🚀 Profit Sharing 50/50 – Discipline & Transparency
📊 Free Signals: 👉 t.me/Forexcryptoaccountms
💼 Account Management: DM me or join the channel
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
✨ Shared Success | Trusted Growth ✨
🚀 Profit Sharing 50/50 – Discipline & Transparency
📊 Free Signals: 👉 t.me/Forexcryptoaccountms
💼 Account Management: DM me or join the channel
🚀 Profit Sharing 50/50 – Discipline & Transparency
📊 Free Signals: 👉 t.me/Forexcryptoaccountms
💼 Account Management: DM me or join the channel
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.