A strategy framework that provides switches for ATR bands, a trading session, a trend filter, three moving averages and take profit and stop loss levels.
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
130 lines of Pine Script v5 from message (10).txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Hotch Break Strat (Template) has a session and weekday filter, backtest start and stop dates, and a long, short or both setting. Take profit and stop loss are ATR multiples, three and one by default. The section for entry indicators is blank in this file, so entries depend on code the user adds. It stacks up to 20 entries at 1 percent of equity and calculates on every tick.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Strategy Direction
string
all
strat_dir_input
ATR Bands
bool
true
ATRBandsOO
Session
bool
true
SessionOO
Trend SNEK
bool
true
TSOO
MA 1
bool
true
MA1OO
MA 2
bool
true
MA2OO
MA 3
bool
true
MA3OO
TP/SL
bool
true
TPSLOO
Session
session
0600-1800
sessionInput
daysInput
string
1234567
daysInput
Backtest Start Year
int
2020
testStartYear
Backtest Start Month
int
10
testStartMonth
Show all 25 settings
Setting
Type
Default
Variable
Backtest Start Day
int
1
testStartDay
Backtest Stop Year
int
2030
testStopYear
Backtest Stop Month
int
12
testStopMonth
Backtest Stop Day
int
30
testStopDay
ATR Period for TP & SL
int
14
atrPeriodsltp
Source TP
source
close
srcUpper
Source SL
source
close
srcLower
ATR Multiplier TP
int
3
atrMultiplierTP
ATR Multiplier SL
int
1
atrMultiplierSL
Sup/Res Entry
string
ST1
entryType
Pips
int
20
pipsby
SL Calculation type
string
ATR
slcalc
Pip Multiplier
int
3
pipsMult
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 offers two selectable entry modes: a Bollinger squeeze on typical price and a simple moving-average cross. It filters trades by weekday, session, date range, and an optional news window, and can restrict direction or invert the side. Risk
This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto
This strategy places buy-stop and sell-stop orders around the opening-session high and low, offset by a user-defined pip gap, and only allows those orders during a separate trading session. It exits with a fixed or ATR-based stop loss and a matching take-profi
This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take
Claude Quant - Multi-Session Strategy is a reference strategy framework designed for multi-session index trading across Nikkei, DAX, and Nasdaq markets. It outlines a session sequencing architecture that adjusts base risk parameters, applies conditional expans
This strategy identifies volatility breakout opportunities by constructing dynamic ATR-based price boxes and detecting volatility squeezes. Trades are filtered using an exponential moving average trend condition and designated session hours. Entries trigger up