A strategy that places limit orders at the midpoint of a candle with no wick on the entry side, when a trend quality measure is above a bull threshold or below a bear threshold.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Further filters cover close position within the candle, minimum body size relative to ATR, trading sessions in Singapore time, a window after each hour turn, VWAP side and weekdays. Each trade has an ATR-based initial stop and a fixed reward-to-risk target, with fixed quantity and limit orders that expire after a set number of bars.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Fast Length
int
7
lenFast
Slow Length
int
15
lenSlow
Trend Length
int
4
lenTrend
Noise Type
string
LINEAR
typeNoise
Noise Length
int
250
lenNoise
Correction Factor
int
2
corrFactor
Bull Threshold (TQ ≥)
float
2.0
tqBullMin
Bear Threshold (TQ ≤ −)
float
2.0
tqBearMin
Min Close Position
float
0.5
minClosePos
Min Body (× ATR)
float
0.2
minBodyFactor
Enable Session Filter
bool
true
filterSessions
Asia (06:00–12:00 SGT)
bool
false
tradeAsia
Show all 29 settings
Setting
Type
Default
Variable
London (12:00–18:00 SGT)
bool
true
tradeLondon
New York (18:00–00:00 SGT)
bool
true
tradeNY
Avoid Macro Windows
bool
true
filterMacro
Bars After Hour Turn
int
5
macroBars
Enable VWAP Filter
bool
true
filterVwap
Anchor Period
string
Session
vwapAnchor
Enable Day Filter
bool
false
filterDays
Monday
bool
true
tradeMonday
Tuesday
bool
true
tradeTuesday
Wednesday
bool
true
tradeWednesday
Thursday
bool
true
tradeThursday
Friday
bool
true
tradeFriday
Limit Expiry (bars)
int
6
limitExpire
ATR Length
int
14
atrLen
ATR Multiplier
float
1.5
atrMult
Risk:Reward Ratio
float
1.5
rrMult
Fixed Quantity
float
1.0
fixedQty
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 strategy trades the three-candle strike pattern filtered by trend direction and time sessions. It calculates market regime using linear regression and exponential or smoothed moving averages to distinguish between ranging and trending conditions. Risk man
Hercules Strategy Rewrite is an automated backtesting strategy that generates entry signals using engulfing candlestick patterns, tick thresholds, and support or resistance level breakouts. It offers multi-layer filtering including moving average trend checks,
Dskyz Adaptive Futures Elite (DAFE) is an automated strategy designed for intraday trading. It generates long and short entries by pairing fast and slow moving average crossovers with candlestick pattern detection, filtered by RSI, volume, volatility, and a hi
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
Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish
Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows