OPEN-SOURCE SCRIPT
🧠 ProMA+TP/SL

🧠 ProMA+TP/SL — Intelligent Trend Reversal Signal with Auto TP/SL & R:R Zones
🔍 Overview
ProMA+TP/SL is a smart trend reversal signal system that detects confirmed shifts in trend using a triple moving average (MA) method. It plots one-time buy/sell signals, automatic or custom Take Profit (TP) and Stop Loss (SL) zones, and a Risk:Reward (R:R) label — all visualized on the chart.
This indicator is optimized for:
✅ Stock Market (India) — Intraday, Swing, Positional
✅ Crypto Markets — Scalping, Intraday, Swing, Positional
| Strategy Type | Fast MA | Mid MA | Slow MA |
| ------------- | ------- | ------ | ------- |
| Scalping | 5 | 13 | 21 |
| Intraday | 10 | 20 | 50 |
| Swing | 20 | 50 | 100 |
| Positional | 20 | 50 | 200 |
MA Type: Choose between EMA (default) and SMA
Dynamic MA lengths automatically adjust based on selected strategy type
| Condition | Logic |
| ------------------- | ---------------------------------------------------------------------------- |
| **Bullish** | Fast MA > Mid MA > Slow MA (and previous ≠ Bullish) |
| **Bearish** | Fast MA < Mid MA < Slow MA (and previous ≠ Bearish) |
| **One-Time Signal** | Signal fires only at new trend confirmation |
| **Session Lock** | For Indian stocks, signals are active only between **9:15 AM – 3:15 PM IST** |
| Setting | Behavior |
| ---------------------- | ---------------------------------------------- |
| Market = Stock (India) | Scalping is automatically switched to Intraday |
| Warning | A visual ⚠️ label appears to notify the trader |
| Strategy Type | TP (%) | SL (%) |
| ------------- | ------ | ------ |
| Scalping | 0.3 | 0.2 |
| Intraday | 0.5 | 0.3 |
| Swing | 1.5 | 1.0 |
| Positional | 3.0 | 1.5 |
🛠️ Custom TP/SL override available via settings
TP and SL levels plotted as lines with % labels
Entry, TP, SL, and R:R zones are automatically visualized
📐 R:R Label Calculation
Component Description
📌 Entry Horizontal line at signal candle’s close
🎯 TP Target line calculated using strategy %
🛑 SL Stop line calculated using strategy %
🔁 R:R Displayed as R:R = 2.5, shows reward/risk ratio
🟡 Candle Coloring Scheme
Trend State Color
Bullish 🟢 Green
Bearish 🔴 Red
Neutral 🟡 Yellow
Helps traders visually interpret trend status at a glance.
📈 Signal Visualization
Signal Type Marker
Buy 🔼 Green triangle below bar
Sell 🔽 Red triangle above bar
Only one signal appears per trend reversal to reduce noise.
✅ Best For:
📊 Intraday and Swing traders
💡 Traders who want clean entry/exit with R:R clarity
📉 Crypto and Indian stock market participants
🔕 Users who prefer no repeated signals in same trend
⚠️ Disclaimer:
This tool is meant for educational and planning purposes only.
Always confirm with price action, volume, or other confluences before trading.
This is not financial advice. Backtest thoroughly before use.
🔍 Overview
ProMA+TP/SL is a smart trend reversal signal system that detects confirmed shifts in trend using a triple moving average (MA) method. It plots one-time buy/sell signals, automatic or custom Take Profit (TP) and Stop Loss (SL) zones, and a Risk:Reward (R:R) label — all visualized on the chart.
This indicator is optimized for:
✅ Stock Market (India) — Intraday, Swing, Positional
✅ Crypto Markets — Scalping, Intraday, Swing, Positional
| Strategy Type | Fast MA | Mid MA | Slow MA |
| ------------- | ------- | ------ | ------- |
| Scalping | 5 | 13 | 21 |
| Intraday | 10 | 20 | 50 |
| Swing | 20 | 50 | 100 |
| Positional | 20 | 50 | 200 |
MA Type: Choose between EMA (default) and SMA
Dynamic MA lengths automatically adjust based on selected strategy type
| Condition | Logic |
| ------------------- | ---------------------------------------------------------------------------- |
| **Bullish** | Fast MA > Mid MA > Slow MA (and previous ≠ Bullish) |
| **Bearish** | Fast MA < Mid MA < Slow MA (and previous ≠ Bearish) |
| **One-Time Signal** | Signal fires only at new trend confirmation |
| **Session Lock** | For Indian stocks, signals are active only between **9:15 AM – 3:15 PM IST** |
| Setting | Behavior |
| ---------------------- | ---------------------------------------------- |
| Market = Stock (India) | Scalping is automatically switched to Intraday |
| Warning | A visual ⚠️ label appears to notify the trader |
| Strategy Type | TP (%) | SL (%) |
| ------------- | ------ | ------ |
| Scalping | 0.3 | 0.2 |
| Intraday | 0.5 | 0.3 |
| Swing | 1.5 | 1.0 |
| Positional | 3.0 | 1.5 |
🛠️ Custom TP/SL override available via settings
TP and SL levels plotted as lines with % labels
Entry, TP, SL, and R:R zones are automatically visualized
📐 R:R Label Calculation
Component Description
📌 Entry Horizontal line at signal candle’s close
🎯 TP Target line calculated using strategy %
🛑 SL Stop line calculated using strategy %
🔁 R:R Displayed as R:R = 2.5, shows reward/risk ratio
🟡 Candle Coloring Scheme
Trend State Color
Bullish 🟢 Green
Bearish 🔴 Red
Neutral 🟡 Yellow
Helps traders visually interpret trend status at a glance.
📈 Signal Visualization
Signal Type Marker
Buy 🔼 Green triangle below bar
Sell 🔽 Red triangle above bar
Only one signal appears per trend reversal to reduce noise.
✅ Best For:
📊 Intraday and Swing traders
💡 Traders who want clean entry/exit with R:R clarity
📉 Crypto and Indian stock market participants
🔕 Users who prefer no repeated signals in same trend
⚠️ Disclaimer:
This tool is meant for educational and planning purposes only.
Always confirm with price action, volume, or other confluences before trading.
This is not financial advice. Backtest thoroughly before use.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。