OPEN-SOURCE SCRIPT
Fractal Runner Strategy [LuxAlgo]

Follow these exact rules and logic step-by-step:
1. Inputs & Core Components
EMA 1: Length 36 (Source: Close)
EMA 2: Length 100 (Source: Close)
Fractals: Standard Williams Fractals (5-bar period: 2 bars before, 1 center, 2 bars after).
2. Multi-Timeframe Trend Filter (4-Hour Chart)
The indicator must track the trend on the 4-Hour (240 min) timeframe using Market Structure.
4H Uptrend: Higher Highs and Higher Lows.
4H Downtrend: Lower Highs and Lower Lows.
Signals on the current timeframe should only trigger if they align with the 4H trend direction.
3. Entry Conditions
LONG Signal (Buy)
Trigger a "Buy" signal when ALL of the following are true on the 15-minute chart:
Trend Alignment: The 4-Hour trend is Bullish (Higher Highs/Higher Lows).
EMA Alignment: The 36 EMA is strictly ABOVE the 100 EMA.
Pullback Rule: Identify the two most recent Fractal Highs. The most recent Fractal High must be LOWER than the previous Fractal High.
Trigger: Plot a "Buy Stop" level 1 pip ABOVE that most recent Fractal High.
SHORT Signal (Sell)
Trigger a "Sell" signal when ALL of the following are true on the 15-minute chart:
Trend Alignment: The 4-Hour trend is Bearish (Lower Highs/Lower Lows).
EMA Alignment: The 36 EMA is strictly BELOW the 100 EMA.
Pullback Rule: Identify the two most recent Fractal Lows. The most recent Fractal Low must be HIGHER than the previous Fractal Low.
Trigger: Plot a "Sell Stop" level 1 pip BELOW that most recent Fractal Low.
4. Trade Management Visuals (Levels)
When a signal triggers, plot the following levels dynamically on the chart for visual reference:
Entry Price: 1 pip above/below the triggering fractal.
Stop Loss (SL): 1 pip below/above the most recent opposite fractal.
Take Profit (TP): Fixed 1:1 Risk-to-Reward ratio based on the distance between Entry and SL.
5. Visuals & Alerts
Plot a green "▲" shape below the bar for a Buy Setup.
Plot a red "▼" shape above the bar for a Sell Setup.
Include alertcondition() functions for both Buy and Sell setups so I can set up real-time notifications.
1. Inputs & Core Components
EMA 1: Length 36 (Source: Close)
EMA 2: Length 100 (Source: Close)
Fractals: Standard Williams Fractals (5-bar period: 2 bars before, 1 center, 2 bars after).
2. Multi-Timeframe Trend Filter (4-Hour Chart)
The indicator must track the trend on the 4-Hour (240 min) timeframe using Market Structure.
4H Uptrend: Higher Highs and Higher Lows.
4H Downtrend: Lower Highs and Lower Lows.
Signals on the current timeframe should only trigger if they align with the 4H trend direction.
3. Entry Conditions
LONG Signal (Buy)
Trigger a "Buy" signal when ALL of the following are true on the 15-minute chart:
Trend Alignment: The 4-Hour trend is Bullish (Higher Highs/Higher Lows).
EMA Alignment: The 36 EMA is strictly ABOVE the 100 EMA.
Pullback Rule: Identify the two most recent Fractal Highs. The most recent Fractal High must be LOWER than the previous Fractal High.
Trigger: Plot a "Buy Stop" level 1 pip ABOVE that most recent Fractal High.
SHORT Signal (Sell)
Trigger a "Sell" signal when ALL of the following are true on the 15-minute chart:
Trend Alignment: The 4-Hour trend is Bearish (Lower Highs/Lower Lows).
EMA Alignment: The 36 EMA is strictly BELOW the 100 EMA.
Pullback Rule: Identify the two most recent Fractal Lows. The most recent Fractal Low must be HIGHER than the previous Fractal Low.
Trigger: Plot a "Sell Stop" level 1 pip BELOW that most recent Fractal Low.
4. Trade Management Visuals (Levels)
When a signal triggers, plot the following levels dynamically on the chart for visual reference:
Entry Price: 1 pip above/below the triggering fractal.
Stop Loss (SL): 1 pip below/above the most recent opposite fractal.
Take Profit (TP): Fixed 1:1 Risk-to-Reward ratio based on the distance between Entry and SL.
5. Visuals & Alerts
Plot a green "▲" shape below the bar for a Buy Setup.
Plot a red "▼" shape above the bar for a Sell Setup.
Include alertcondition() functions for both Buy and Sell setups so I can set up real-time notifications.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Regards
Ramchandhar Rapolu
Ramchandhar Rapolu
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Regards
Ramchandhar Rapolu
Ramchandhar Rapolu
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.