This strategy executes long and short trades on the price chart by combining multi-timeframe smoothed Heikin-Ashi trends, higher-timeframe Hull Moving Average variations, and an ATR-based trailing stop.
1Copy the scriptPress Copy script above, or the copy button on the code below.
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
167 lines of Pine Script v5 from Tradingview/session-wicks.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Users can adjust timeframes, smoothing lengths, Hull formulas, ATR sensitivity multipliers, optional trading session hours, and fixed take-profit and stop-loss targets. The strategy manages exits through enabled stop-loss and take-profit parameters. A notable limitation is that it requests higher-timeframe data with lookahead enabled, which introduces lookahead bias during historical backtesting.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
HA Timeframe
timeframe
30
ha_tf
Length 1
int
10
len
Length 2
int
10
len2
Source
source
close
hull_src
Hull Variation
string
Hma
modeSwitch
Length(180-200 for floating S/R , 55 for swing entry)
int
55
hull_length
Higher timeframe
timeframe
15
hull_tf
Key Vaule. 'This changes the sensitivity'
float
3
keyvalue
ATR Period
int
10
atrperiod
Strategy Start Date
time
timestamp("01 January 2020 00:00:00 UTC-5")
strategy_start
Use Trading Hours
bool
false
use_trading_hours
session
0930-1600
trading_time
Show all 18 settings
Setting
Type
Default
Variable
Long Trades
bool
true
long_trades
Short Trades
bool
true
short_trades
TP
bool
true
use_tp
tp_amount
float
5.00
tp_amount
SL
bool
true
use_sl
sl_amount
float
5.00
sl_amount
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 directional momentum breakouts for crude oil on the price chart. It enters long or short positions when a fast exponential moving average crosses a slow exponential moving average, provided that current Average True Range exceeds its movin
This strategy draws two moving averages on the price chart and uses their bias to open long or short trades. It places the stop beyond a swing high or low using an ATR risk multiple, then sets a limit exit from the reward-to-risk ratio. An optional ATR trail c
The IBKR Safe Forex Strategy is a Pine Script v6 strategy that trades forex pairs using crossovers of 10-period and 50-period EMAs, filtered by a 200-period EMA and restricted to London or New York session overlap. It enters long positions on fast EMA above sl
This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo
This strategy template provides a modular foundation for building TradingView v6 backtests. It uses a placeholder Exponential Moving Average crossover signal combined with customizable filters for higher-timeframe trend alignment, volatility regime thresholds,
This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries