This overlay strategy builds independent timed session ranges and marks range, trendline, mean, VWAP, and high-low levels when those displays are enabled.
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
MSG Enhanced LEGO System Strategy enters on range breakouts and exits with strategy exits, choosing among range, ATR, fixed-point, and risk-reward stop-loss and take-profit methods, with optional trailing, break-even, and partial exits. Settings change session hours and colors, position size, volume, trend, time, and range filters, plus daily loss, drawdown, and consecutive-loss limits. It draws boxes and trade levels on the price chart and can show a statistics table.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
sessionAEnabled
bool
true
sessionAEnabled
sessionAStartHour
int
13
sessionAStartHour
sessionAStartMinute
int
0
sessionAStartMinute
sessionAEndHour
int
22
sessionAEndHour
sessionAEndMinute
int
0
sessionAEndMinute
sessionAColor
color
color.orange
sessionAColor
Range
bool
true
sessionAShowRange
Trendline
bool
false
sessionAShowTrendline
Mean
bool
false
sessionAShowMean
VWAP
bool
true
sessionAShowVWAP
Max/Min
bool
true
sessionAShowMaxMin
sessionBEnabled
bool
true
sessionBEnabled
Show all 40 settings
Setting
Type
Default
Variable
sessionBStartHour
int
8
sessionBStartHour
sessionBStartMinute
int
0
sessionBStartMinute
sessionBEndHour
int
17
sessionBEndHour
sessionBEndMinute
int
0
sessionBEndMinute
sessionBColor
color
color.blue
sessionBColor
Range
bool
true
sessionBShowRange
Trendline
bool
false
sessionBShowTrendline
Mean
bool
false
sessionBShowMean
VWAP
bool
false
sessionBShowVWAP
Max/Min
bool
false
sessionBShowMaxMin
sessionCEnabled
bool
true
sessionCEnabled
sessionCStartHour
int
0
sessionCStartHour
sessionCStartMinute
int
0
sessionCStartMinute
sessionCEndHour
int
9
sessionCEndHour
sessionCEndMinute
int
0
sessionCEndMinute
sessionCColor
color
color.fuchsia
sessionCColor
Range
bool
true
sessionCShowRange
Trendline
bool
false
sessionCShowTrendline
Mean
bool
false
sessionCShowMean
VWAP
bool
false
sessionCShowVWAP
Max/Min
bool
false
sessionCShowMaxMin
msg1Enabled
bool
false
msg1Enabled
msg1StartHour
int
23
msg1StartHour
msg1StartMinute
int
0
msg1StartMinute
msg1EndHour
int
1
msg1EndHour
msg1EndMinute
int
0
msg1EndMinute
msg1Color
color
color.yellow
msg1Color
Range
bool
false
msg1ShowRange
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 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 script monitors opening gap conditions and breakout behavior relative to the first candle's range across up to twenty configurable stock tickers. It detects whether following bars remain inside the opening range before breaking out, displaying the status
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
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