This strategy plots up to four volume-weighted average price lines on the price chart: midnight, previous day, session, and a custom anchor such as session high and low, week, or month.
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
[TradersPost] Multi-VWAP Crossover enters when price crosses two selected lines, using same-bar, position, or either-cross logic, and can require the lines to align. Direction, market or limit orders, and a single-position mode are selectable. Stop loss is enabled by default, with optional take profit, trailing stops, and breakeven. Session hours, timezone, units, ATR length, and an optional date range adjust the setup.
Midnight, previous day, session and custom VWAP lines
Same-bar, position and either-cross entry modes
Optional line alignment filter
Stop loss, take profit, trailing stop and breakeven
Configurable units, timezone and backtest date range
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Signal Line 1
string
Midnight
i_signal_line1
Signal Line 2
string
Session
i_signal_line2
Entry Mode
string
Position
i_entry_mode
Require Line Alignment
bool
false
i_require_alignment
Midnight VWAP
bool
true
i_show_midnight
i_color_midnight
color
color.teal
i_color_midnight
Previous Day VWAP
bool
true
i_show_prevday
i_color_prevday
color
color.orange
i_color_prevday
Session VWAP
bool
true
i_show_session
i_session_time
session
0930-1600
i_session_time
i_color_session
color
color.orange
i_color_session
Custom VWAP
bool
false
i_show_custom
Show all 40 settings
Setting
Type
Default
Variable
i_custom_type
string
Session High/Low
i_custom_type
i_color_custom
color
color.purple
i_color_custom
Default Unit
string
PnL
i_global_unit
ATR Period
int
14
i_atr_period
Timezone
string
America/New_York
i_global_tz
Trigger Price
string
Current
i_trigger_price
Use Date Range
bool
false
i_use_backtest_range
i_backtest_preset
string
Custom
i_backtest_preset
Start Date
time
timestamp('01 Jan 2020 00:00 +0000')
i_backtest_start
End Date
time
timestamp('31 Dec 2030 23:59 +0000')
i_backtest_end
Direction
string
Both
i_direction
i_order_type
string
Market
i_order_type
i_color_entry
color
color.gray
i_color_entry
└ Limit Offset
float
5
i_limit_offset
i_limit_offset_unit
string
Ticks
i_limit_offset_unit
Position Mode
string
Single
i_position_mode
Use Stop Loss
bool
true
i_use_sl
i_sl_value
float
1000
i_sl_value
i_sl_unit
string
Global
i_sl_unit
i_color_sl
color
color.red
i_color_sl
└ Trailing ›
bool
false
i_use_trail
Trigger
float
500
i_trail_activation
Offset
float
250
i_trail_offset
└ BE ›
bool
false
i_use_breakeven
Trigger
float
1000
i_breakeven_activation
Lock In
float
500
i_breakeven_profit
i_color_be_trig
color
#ff9900ba
i_color_be_trig
Use Take Profit
bool
true
i_use_tp
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 Pine Script strategy identifies potential Buy Today, Sell Tomorrow (BTST) opportunities based on price action and volume patterns. It calculates a 20-period simple moving average of volume and checks for three consecutive bullish candles with higher highs
This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses
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
This strategy combines Smart Money Concepts (BOS and CHoCH) with moving average trend filtering and volume spikes to generate trade signals. It checks for 20 EMA and 50 EMA alignment, along with volume 20% above its 20-period SMA. Long entries require a bullis
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim
This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail