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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.