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
STT ExitOnly Trade Plan Directional enters trades based on customizable combinations of price triggers, TMA crosses, or breakout criteria, supporting long, short, or bidirectional positioning. Positions are managed through TMA and VWAP exit conditions alongside mandatory intraday session cut-off times. The strategy overlays directly onto the price chart and features configurable trading windows, volume filters, and daily trade limits.
Configurable TMA crossing and breakout entry triggers
VWAP and TMA exit condition filters
Intraday entry and daily forced exit time windows
Directional trade selection for long, short, or both
Pre-market high, float size, and volume gain filters
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Script Title
string
STT ExitOnly Trade Directional Strategy
scriptName
Show label on chart?
bool
false
showLabel
Entry Type
string
TMA-Crossing
primaryEntryType
Entry Type Addition Logical Method
string
or
additionalEntryTypeLogic
Price Trigger Type
string
Close
mainTriggerPriceType
Limit Only One Trade Per Day
bool
false
oneSignalPerDay
Enable Daily Close
bool
true
closeDaily
Trade types allowed
enum
TradeDirection.Long
tradeDirectionSelected
Hour (ET) to begin allowing trade entry
int
8
dailyEntryWindowStartHour
Minutes after Hour to begin allowing trade entry
int
30
dailyEntryWindowStartMinute
Hour (ET) to force daily trade exits
int
15
dailyExitWindowStartHour
Minutes after Hour to force trade exits
int
30
dailyExitWindowStartMinute
Show all 40 settings
Setting
Type
Default
Variable
Force Exit Buffer Minutes
int
15
exitBufferMinutes
Allow Trading Alerts in Extended Hours
bool
true
allowETH
Trigger Entry Enable Hour (ET)
int
9
triggerHour
Trigger Entry Enable Minute
int
45
triggerMinute
Include Pre-Market High
bool
false
usePreMarketHigh
Max Float Size (M)
float
20.0
floatSize
Volume Multiplier
float
1.0
volumeMultiplier
Min Percent Gain (%)
float
25.0
percentGain
Trade Entry Additional Type
string
Breakout
additionalEntryType
Entry Requires TMA bullish state
bool
true
tmaEntry_required
Entry Requires Price Above VWAP
bool
false
vwapEntryRequired
Exit Requires Price Below VWAP
bool
false
vwapExitRequired
Exit Requires TMA bearish state
bool
true
tmaExitRequired
Use Price Only (disables all others)
bool
false
manualPriceOnly
TMA trigger type
enum
TmaTriggerType.Crossing
tmaCrossingType
Primary Stop Type
string
Range-Based
primaryStopLossType
Stop Type Addition Logical Method
string
or
additionalStopLossTypeLogic
Additional Stop Type
string
TMA-Crossing
additionalStopLossType
Primary Take Profit Type
string
Range-Based
primaryTakeProfitType
Additional Take Profit Type
string
TMA-Crossing
additionalTakeProfitType
Take Profit $1 Range Start
float
0.07
tpAmount
Use Range Based Stop/Profits
bool
true
rangeBased
Long starting value at $1
float
0.08
rangeBasedInit
Short starting value at $1
float
0.12
shortBasedInit
Trailing Stop (0.0=disabled)
float
0.07
tsAmount
Trailing Stop Minimum Profit
float
0.05
tsMinProfit
Stop Type
string
$
tsType
Limit to under $1000 close.
bool
true
priceAdjust
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 intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th
This strategy trades Nikkei 225 futures during a configurable overnight session, defaulting to 19:00–03:00 ET. It builds long and short trend conditions from an 8/21 EMA pair and a 200-period SMA, with RSI, momentum, an ATR-scaled breakout range, and a volume
This overlay strategy tracks the high and low of a user-defined London session and plots the previous session levels as support and resistance. It flags a break beyond a level when price closes past an ATR buffer, then waits a set number of bars for a retest w
Ultimate PropFirm Strategy - QuantAlgo is an intraday trading system that combines Smart Money Concepts with exponential moving averages and volume filters on the main price chart. It identifies trend setups using Break of Structure, Fair Value Gaps, and order
This strategy overlays three Simple Moving Averages, one Exponential Moving Average, and a dynamic trailing swing line directly on the price chart. It determines market direction by tracking recent highest highs and lowest lows over a customizable swing period
ORB Hunter is an Opening Range Breakout strategy that identifies price breakouts beyond a defined opening session window (such as 09:30 to 09:45 EST). It places long or short trades when price crosses the opening range bounds with buffer, confirmed by optional