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
75 lines of Pine Script v6 from s50_tfex_strategy_copy.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Swing highs and lows are found from left and right bar counts, with stop entries placed beyond them. Each entry has an exit order with a stop one ATR past the pivot and a limit set by a risk to reward ratio. Size is based on a percent of equity at risk. It plots the latest pivot levels and an optional return table. Pivot signals arrive late and orders run on every tick.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
leftBars
int
21
leftBars
rightBars
int
2
rightBars
Risk % per Trade
int
1
riskPercent
ATR Length
int
10
atrLength
Risk-Reward Ratio
int
2
riskRewardRatio
Return Precision
int
2
prec
Show Return Rate Table On/Off
bool
true
show_table
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 plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry
This strategy trades Donchian breakouts measured on weekly bars while orders execute on the chart timeframe. It allows long and short entries when price breaks the prior weekly channel and exits against the shorter weekly channel. Position size risks a set per
Calculates upper and lower Donchian Channel bands over a customizable lookback length and plots them on the main price chart. At a specified exchange hour, the strategy places a long buy stop order at the upper Donchian Channel level. Unfilled pending orders a
This overlay strategy builds independent timed session ranges and marks range, trendline, mean, VWAP, and high-low levels when those displays are enabled. It enters on range breakouts and exits with strategy exits, choosing among range, ATR, fixed-point, and r
Donchian Channel Breakout is a Pine Script v5 strategy drawn on the price chart. It enters long when close crosses above the previous upper Donchian band and short when close crosses below the previous lower band, reversing with the opposite signal. An ATR tra
The Range Percent Breakout Strategy identifies range contraction and inside bar patterns where the current bar's range is within a specified percentage threshold of the previous bar. When this condition is met while flat, breakout levels are established above