OPEN-SOURCE SCRIPT

🧠 ProMA+TP/SL

373
🧠 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.


Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.