OPEN-SOURCE SCRIPT

SMC Structure [PickMyTrade]

206
Concept & Methodology

This strategy is an implementation of Smart Money Concepts (SMC) logic combined with structured risk management rules. The purpose of the script is to demonstrate how market structure analysis and position sizing logic can be applied in a systematic, rule-based approach.

The design emphasizes consistency, trade management, and controlled risk rather than signal frequency.

How It Works
1. Market Structure Detection

The strategy evaluates market structure using swing points:

Swings are identified using pivot highs and lows with a configurable lookback period.

Break of Structure (BOS) is detected when price breaks a prior swing level, indicating a potential structural shift or continuation.

Order Blocks are identified after a valid BOS and represent the candle range associated with the structure break.

2. Entry Logic

After a valid structure break, the strategy waits for price to retrace into the identified Order Block zone. Optional filters can be enabled to refine entries:

Trend Filter: Uses the 50 EMA to align trades with directional bias.

Volatility Filter: Uses ATR to avoid low-volatility conditions.

Candle Confirmation: Requires a directional candle within the Order Block area.

3. Risk Management Logic

Risk is handled through predefined and configurable rules:

Dynamic Position Sizing: Position size is calculated based on a fixed percentage of account equity and the distance to the stop loss.

Multiple Take-Profit Levels (optional):

TP1 at a fixed risk-to-reward ratio.

TP2 with an optional trailing stop mechanism.

Stop loss placement is derived from structure-based levels.

Settings Guide

Risk and Position Sizing: Controls the percentage of equity risked per trade.

Filters: Enable or disable trend, volatility, and confirmation logic.

Display Options: Toggle structure points, order blocks, and trade labels.

Strategy Explanation (Code Overview)

The script defines realistic strategy properties such as commission, margin, and pyramiding limits to improve backtesting accuracy.

Market structure is identified using pivot-based swing detection, with BOS logic tracking the most recent swing levels. Order Blocks are derived from candles preceding valid structure breaks.

Trade execution occurs only when no active position is present. Entry conditions require price interaction with a valid Order Block and confirmation from enabled filters. Position size is calculated dynamically based on risk settings.

Exit management supports partial exits at predefined risk-to-reward levels, with optional trailing stop logic for remaining position size.

A statistics panel is displayed on the chart to summarize current settings and account information. This panel is informational only and does not affect strategy logic or results.

Disclaimer

This strategy is provided for educational and analytical purposes only. It does not constitute financial or investment advice. Past performance does not guarantee future results. Users should independently evaluate and backtest the strategy on their own instruments and timeframes before using it for any trading decisions.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.