Strategy · Pine Script v6 · On the chart

Exit Orders

by TradersPost

This strategy provides reusable building blocks for entries, exits, and risk management in Pine Script.

View on GitHub

Repaints

GitHub stars218on the repository
Pine versionv6current
Lines of code1,145
Settings40inputs
LicenceNone stated
Last update3 months ago23 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

TradersPost on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Sessions & time

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Long Signalsourceclosei_long_source
Short Signalsourceclosei_short_source
Default UnitstringPnLi_global_unit
ATR Periodint14i_atr_period
TimezonestringAmerica/New_Yorki_global_tz
Trigger PricestringCurrenti_trigger_price
Use Date Rangeboolfalsei_use_backtest_range
i_backtest_presetstringCustomi_backtest_preset
Start Datetimetimestamp('01 Jan 2020 00:00 +0000')i_backtest_start
End Datetimetimestamp('31 Dec 2030 23:59 +0000')i_backtest_end
DirectionstringBothi_direction
i_order_typestringMarketi_order_type
Show all 40 settings
SettingTypeDefaultVariable
i_color_entrycolorcolor.grayi_color_entry
└ Limit Offsetfloat5i_limit_offset
i_limit_offset_unitstringTicksi_limit_offset_unit
Position ModestringSinglei_position_mode
Use Stop Lossbooltruei_use_sl
i_sl_valuefloat200i_sl_value
i_sl_unitstringGlobali_sl_unit
i_color_slcolorcolor.redi_color_sl
└ Trailing  ›boolfalsei_use_trail
Triggerfloat500i_trail_activation
Offsetfloat250i_trail_offset
└ BE  ›boolfalsei_use_breakeven
Triggerfloat1000i_breakeven_activation
Lock Infloat500i_breakeven_profit
i_color_be_trigcolor#ff9900bai_color_be_trig
Use Take Profitbooltruei_use_tp
i_tp_valuefloat200i_tp_value
i_tp_unitstringGlobali_tp_unit
i_color_tpcolorcolor.greeni_color_tp
└ Trailing  ›boolfalsei_use_trail_tp
Triggerfloat1000i_trail_tp_activation
Offsetfloat500i_trail_tp_offset
Session 1booltruei_use_session1
i_session1session0930-1600i_session1
Closeboolfalsei_session1_close
Session 2boolfalsei_use_session2
i_session2session1900-0400i_session2
Closeboolfalsei_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.

Similar Pine Scripts

361 stars

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

Strategy v6 Sessions & time
Updated today · AGPL-3.0 GitHub repository of Forven S01512 - Monday Drift

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

Strategy v5 Volatility & bandsMoving averages
Updated today · None stated GitHub repository of Boilerplate Configurable Strategy [Yosiet]
257 stars

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

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald - Test Logic Futures
106 stars

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

Strategy v4 Screeners & dashboardsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 1St Bar GAP+BkOut Screener v2 by RM
53 stars

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

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

ATOM 1m scalp HK

by dearvn
43 stars

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

Strategy v5 ScalpingSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of ATOM 1m scalp HK

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers