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
Exit Orders calculates profit and loss units, applies session filtering based on timezone, and handles backtest date ranges. It includes risk settings like stop loss, trailing stops, and breakeven, as well as take profit options. The main settings allow customization of position modes, order types, and trigger prices. It draws on the price chart for visual entries and exits. It repaints on the live bar and supports multiple position modes.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Long Signal
source
close
i_long_source
Short Signal
source
close
i_short_source
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
Show all 40 settings
Setting
Type
Default
Variable
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
200
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
i_tp_value
float
200
i_tp_value
i_tp_unit
string
Global
i_tp_unit
i_color_tp
color
color.green
i_color_tp
└ Trailing ›
bool
false
i_use_trail_tp
Trigger
float
1000
i_trail_tp_activation
Offset
float
500
i_trail_tp_offset
Session 1
bool
true
i_use_session1
i_session1
session
0930-1600
i_session1
Close
bool
false
i_session1_close
Session 2
bool
false
i_use_session2
i_session2
session
1900-0400
i_session2
Close
bool
false
i_session2_close
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.
Forven S01512 — Monday Drift is a calendar-based long trading strategy designed to exploit time-based recurring market patterns. It tracks UTC calendar days and hours to enter a long position at a specified day and hour, holding it for a fixed duration until a
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
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 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 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