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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.