OPEN-SOURCE SCRIPT
Stratégie SMC V18.2 (BTC/EUR FINAL R3 - Tendance)

This strategy is an automated implementation of Smart Money Concepts (SMC), designed to operate on the Bitcoin/Euro (BTC/EUR) chart using the 15-minute Timeframe (M15).It focuses on identifying high-probability zones (Order Blocks) after a confirmed Break of Structure (BOS) and a Liquidity Sweep, utilizing an H1/EMA 200 trend filter to only execute trades in the direction of the dominant market flow.Risk management is strict: every trade uses a fixed Risk-to-Reward Ratio (R:R) of 1:3.🧱 Core Logic Components
1. Trend Filter (H1/EMA 200)Objective: To avoid counter-trend entries, which has allowed the success rate to increase to nearly $65\%$ in backtests.Mechanism: A $200$-period EMA is plotted on a higher timeframe (Default: H1/60 minutes).Long (Buy): Entry is only permitted if the current price (M15) is above the trend EMA.Short (Sell): Entry is only permitted if the current price (M15) is below the trend EMA.
2. Order Block (OB) DetectionA potential Order Block is identified on the previous candle if it is
accompanied by an inefficiency (FVG - Fair Value Gap).
3. Advanced SMC ValidationBOS (Break of Structure): A recent BOS must be confirmed by breaking the swing high/low defined by the swing length (Default: 4 M15 candles).Liquidity (Liquidity Sweep): The Order Block zone must have swept recent liquidity (defined by the Liquidity Search Length) within a certain tolerance (Default: $0.1\%$).Point of Interest: The OB must form in a premium zone (for shorts) or a discount zone (for longs) relative to the current swing range (above or below the $50\%$ level of the range).
4. Execution and Risk ManagementEntry: The trade is triggered when the price touches the active Order Block (mitigation).Stop Loss (SL): The SL is fixed at the low of the OB (for longs) or the high of the OB (for shorts).Take Profit (TP): The TP is strictly set at a level corresponding to 3 times the SL distance (R:R 1:3).Lot Sizing: The trade quantity is calculated to risk a fixed amount (Default: 2.00 Euros) per transaction, capped by a Lot Max and Lot Min defined by the user.
Input Parameters (Optimized for BTC/EUR M15)Users can adjust these parameters to modify sensitivity and risk profile. The default values are those optimized for the high-performing backtest (Profit Factor $> 3$).ParameterDescriptionDefault Value (M15)Long. Swing (BOS)Candle length used to define the swing (and thus the BOS).4Long. Recherche Liq.Number of candles to scan to confirm a liquidity sweep.7Tolérance Liq. (%)Price tolerance to validate the liquidity sweep (as a percentage of price).0.1Timeframe TendanceChart timeframe used for the EMA filter (e.g., 60 = H1).60 (H1)Longueur EMA TendancePeriods used for the trend EMA.200Lot Max (Quantité Max BTC)Maximum quantity of BTC the strategy is allowed to trade.0.01Lot Min Réel (Exigence Broker)Minimum quantity required by the broker/exchange.0.00001
1. Trend Filter (H1/EMA 200)Objective: To avoid counter-trend entries, which has allowed the success rate to increase to nearly $65\%$ in backtests.Mechanism: A $200$-period EMA is plotted on a higher timeframe (Default: H1/60 minutes).Long (Buy): Entry is only permitted if the current price (M15) is above the trend EMA.Short (Sell): Entry is only permitted if the current price (M15) is below the trend EMA.
2. Order Block (OB) DetectionA potential Order Block is identified on the previous candle if it is
accompanied by an inefficiency (FVG - Fair Value Gap).
3. Advanced SMC ValidationBOS (Break of Structure): A recent BOS must be confirmed by breaking the swing high/low defined by the swing length (Default: 4 M15 candles).Liquidity (Liquidity Sweep): The Order Block zone must have swept recent liquidity (defined by the Liquidity Search Length) within a certain tolerance (Default: $0.1\%$).Point of Interest: The OB must form in a premium zone (for shorts) or a discount zone (for longs) relative to the current swing range (above or below the $50\%$ level of the range).
4. Execution and Risk ManagementEntry: The trade is triggered when the price touches the active Order Block (mitigation).Stop Loss (SL): The SL is fixed at the low of the OB (for longs) or the high of the OB (for shorts).Take Profit (TP): The TP is strictly set at a level corresponding to 3 times the SL distance (R:R 1:3).Lot Sizing: The trade quantity is calculated to risk a fixed amount (Default: 2.00 Euros) per transaction, capped by a Lot Max and Lot Min defined by the user.
Input Parameters (Optimized for BTC/EUR M15)Users can adjust these parameters to modify sensitivity and risk profile. The default values are those optimized for the high-performing backtest (Profit Factor $> 3$).ParameterDescriptionDefault Value (M15)Long. Swing (BOS)Candle length used to define the swing (and thus the BOS).4Long. Recherche Liq.Number of candles to scan to confirm a liquidity sweep.7Tolérance Liq. (%)Price tolerance to validate the liquidity sweep (as a percentage of price).0.1Timeframe TendanceChart timeframe used for the EMA filter (e.g., 60 = H1).60 (H1)Longueur EMA TendancePeriods used for the trend EMA.200Lot Max (Quantité Max BTC)Maximum quantity of BTC the strategy is allowed to trade.0.01Lot Min Réel (Exigence Broker)Minimum quantity required by the broker/exchange.0.00001
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.