OPEN-SOURCE SCRIPT
TrendSync Pro (SMC)

๐ TrendSync Pro (SMC) โ Advanced Trend-Following Strategy with HTF Alignment
Created by Shubham Singh
๐ Strategy Overview
TrendSync Pro (SMC) is a precision-based smart trend-following strategy inspired by Smart Money Concepts (SMC). It combines:
๐ง How It Works:
๐ง Strategy Settings Image:
https://beeimg.com/images/i24866300893.png
The strategy dynamically identifies trend direction by using swing high/low pivots. When a new pivot forms:
๐ ๏ธ Adjustable Parameters:
๐๏ธ Trade Direction Control:
In settings, you can choose:
This allows you to align trades with your own market bias or external analysis.
๐ Entry Logic:
๐ Exit Logic:
โฐ Best Timeframes & Recommended Settings:
Note: These are recommended base settings. Adjust based on volatility, asset class, or personal trading style.
๐ธ Testing Note:
https://beeimg.com/images/n08397397562.png
TradingView limits test length to 20k bars (~40 trades on smaller timeframes). To show long-term results:
๐ Asset Behavior Insight:
This strategy works on multiple assets, including BTC, ETH, etc.
Performance varies by trend strength:
Itโs a trend-following setup. Longer and clearer the trend โ better the results.
โ Best Practices:
โ ๏ธ Trading Disclaimer:
This script is for educational and backtesting purposes only. Trading involves risk. Always use risk management and never invest more than you can afford to lose.
Created by Shubham Singh
๐ Strategy Overview
TrendSync Pro (SMC) is a precision-based smart trend-following strategy inspired by Smart Money Concepts (SMC). It combines:
- [] Real-time pivot-based trendline detection
[] Higher Time Frame (HTF) filtering to align trades with dominant trend
[] Risk management via adjustable Stop Loss (SL) and Take Profit (TP)
[] Directional control โ trade only bullish, bearish, or both setups
[] Realistic backtesting using commissions and slippage
[] Pre-optimized profiles for scalpers, intraday, swing, and long-term traders
๐ง How It Works:
๐ง Strategy Settings Image:
https://beeimg.com/images/i24866300893.png
The strategy dynamically identifies trend direction by using swing high/low pivots. When a new pivot forms:
- [] It draws a trendline from the last significant pivot
[] Detects whether the trend is up (based on pivot lows) or down (based on pivot highs)
[] Waits for price to break above/below the trendline
[] Confirms with HTF price direction (HTF close > previous HTF close = bullish)
[] Only then it triggers a long or short trade
[] It exits either at TP, SL, or a manual trendline break
๐ ๏ธ Adjustable Parameters:
- [] Trend Period: Length for pivot detection (affects sensitivity of trendlines)
[] HTF Timeframe: Aligns lower timeframe entries with higher timeframe direction
[] SL% and TP%: Customize your risk-reward profile
[] Commission & Slippage: Make backtests more realistic - Trade Direction: Choose to trade: Long only, Short only, or Both
๐๏ธ Trade Direction Control:
In settings, you can choose:
- [] Bullish Only: Executes only long entries
[] Bearish Only: Executes only short entries - Both: Executes both long and short entries when conditions are met
This allows you to align trades with your own market bias or external analysis.
๐ Entry Logic:
- Long Entry:
โโข Price crosses above trendline
โโข HTF is bullish (HTF close > previous close)
โโข Latest pivot is a low (trend is considered up) - Short Entry:
โโข Price crosses below trendline
โโข HTF is bearish (HTF close < previous close)
โโข Latest pivot is a high (trend is considered down)
๐ Exit Logic:
- [] Hit Take Profit or Stop Loss
[] Manual trendline invalidation: If price crosses opposite of the trend direction
โฐ Best Timeframes & Recommended Settings:
- Scalping (1m to 5m):
โHTF = 15m | Trend Period = 7
โSL = 0.5% | TP = 1% to 2% - Intraday (15m to 30m):
โHTF = 1H | Trend Period = 10โ14
โSL = 0.75% | TP = 2% to 3% - 6 Hour Trading (30m to 1H):
โHTF = 4H | Trend Period = 20
โSL = 1% | TP = 4% to 6% - Swing Trading (4H to 1D):
โHTF = 1D | Trend Period = 35
โSL = 2% | TP = 8% to 12% - Long-Term Investing (1D+):
โHTF = 1W | Trend Period = 50
โSL = 3% | TP = 15%+
Note: These are recommended base settings. Adjust based on volatility, asset class, or personal trading style.
๐ธ Testing Note:
https://beeimg.com/images/n08397397562.png
TradingView limits test length to 20k bars (~40 trades on smaller timeframes). To show long-term results:
- [] Test on higher timeframes (e.g., 1H, 4H, 1D)
[] Share images of backtest result in description - Host longer test result screenshots on Imgur or any public drive
๐ Asset Behavior Insight:
This strategy works on multiple assets, including BTC, ETH, etc.
Performance varies by trend strength:
- [] Sometimes BTC performs better than ETH
[] Other times ETH gives better results - Thatโs normal as both assets follow different volatility and trend behavior
Itโs a trend-following setup. Longer and clearer the trend โ better the results.
โ Best Practices:
- [] Avoid ranging markets
[] Use proper SL/TP for each timeframe
[] Use directional filter if you already have a directional bias
[] Always forward test before going live
โ ๏ธ Trading Disclaimer:
This script is for educational and backtesting purposes only. Trading involves risk. Always use risk management and never invest more than you can afford to lose.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.