//@version=6
strategy("Doc03 M15 Liquidity Sweep Scalp - Project Adapted", overlay=true, pyramiding=0, initial_capital=10000)
// Source: user-provided strategy collection - strategy 3
// Logic summary:
// 1. Detect a large 15m range candle with balanced wicks.
// 2. In 15m uptrend, buy when price revisits the lower 75% area.
// 3. Stop around 30% area. Target projects part of the range upward.
// 4. This project version can run on 1m or 5m and approximates the original 1m execution.
// Compile confidence: 90/100. Profit confidence: 20/100.
htf = input.timeframe("15", "Range candle timeframe")
emaFastLen = input.int(9, "Trend EMA fast", minval=1)
emaSlowLen = input.int(50, "Trend EMA slow", minval=2)
bodyLookback = input.int(10, "Average body lookback", minval=2)
bodyFactor = input.float(1.0, "Large body factor", minval=0.1, step=0.1)
minWickBodyRatio = input.float(0.10, "Min wick/body ratio", minval=0.0, step=0.05)
maxWickImbalance = input.float(0.50, "Max wick imbalance", minval=0.0, step=0.05)
targetRangeMult = input.float(0.50, "Target above range", minval=0.1, step=0.1)
hOpen = request.security(syminfo.tickerid, htf, open[1])
hHigh = request.security(syminfo.tickerid, htf, high[1])
hLow = request.security(syminfo.tickerid, htf, low[1])
hClose = request.security(syminfo.tickerid, htf, close[1])
hEmaFast = request.security(syminfo.tickerid, htf, ta.ema(close, emaFastLen)[1])
hEmaSlow = request.security(syminfo.tickerid, htf, ta.ema(close, emaSlowLen)[1])
hAvgBody = request.security(syminfo.tickerid, htf, ta.sma(math.abs(close - open), bodyLookback)[1])
hBody = math.abs(hClose - hOpen)
hUpperWick = hHigh - math.max(hOpen, hClose)
hLowerWick = math.min(hOpen, hClose) - hLow
hRange = math.max(hHigh - hLow, syminfo.mintick)
wickDiff = math.abs(hUpperWick - hLowerWick)
wickMax = math.max(math.max(hUpperWick, hLowerWick), syminfo.mintick)
largeBody = hBody >= hAvgBody * bodyFactor
validWicks = hUpperWick >= hBody * minWickBodyRatio and hLowerWick >= hBody * minWickBodyRatio and wickDiff / wickMax <= maxWickImbalance
upTrend = hEmaFast > hEmaSlow
validRange = largeBody and validWicks and upTrend
entryLevel = hLow + hRange * 0.75
stopLevel = hLow + hRange * 0.30
targetLevel = hHigh + hRange * targetRangeMult
longSignal = strategy.position_size == 0 and validRange and close <= entryLevel and close > stopLevel
if longSignal
strategy.entry("Long", strategy.long)
if strategy.position_size > 0
strategy.exit("Long Range Exit", "Long", stop=stopLevel, limit=targetLevel)
if strategy.position_size > 0 and close < stopLevel
strategy.close("Long")
Overview
M15 Liquidity Sweep Scalp verifies a valid range candle using an EMA trend filter, average body size comparison, and wick balance thresholds. In an uptrend, it opens a long position when price retraces into the lower 75% zone of the higher-timeframe candle range. The strategy sets a stop loss at the 30% level of the range and a profit target above the candle high, executing overlay plots directly on the main price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Range candle timeframe
timeframe
15
htf
Trend EMA fast
int
9
emaFastLen
Trend EMA slow
int
50
emaSlowLen
Average body lookback
int
10
bodyLookback
Large body factor
float
1.0
bodyFactor
Min wick/body ratio
float
0.10
minWickBodyRatio
Max wick imbalance
float
0.50
maxWickImbalance
Target above range
float
0.50
targetRangeMult
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This overlay strategy marks short-term turning points on the price chart and enters SPY option-style trades from them. It plots simple moving averages of highs and lows, draws up and down reversal arrows, and colors bars when a short-term extreme coincides wit
This strategy shorts the ES three-minute chart when three consecutive down candles form a triple-red pattern and price is above a Tillson-style T3 average. The average is six nested EMAs of close, combined with fixed coefficients and a user length defaulting t
This strategy trades price action pin bar patterns aligned with moving average trend alignment on the main price chart. It defines uptrends or downtrends using a fan arrangement of three moving averages (6 EMA, 18 EMA, and 50 SMA). Entry conditions require a b
This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R
This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis