This TradingView strategy detects directional trades on the price chart using multiple entry triggers including TMA-Crossing, Breakout, and VWAP-Crossing with price types like Close or Open.
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 Trade Plan Directional applies optional logical combinations of triggers and enforces time windows in ET for entries and daily closes. Additional settings control trade direction, position sizing, one-trade-per-day limits, and stop loss types. The strategy supports long, short, or both directions with fixed quantity and processes orders on close.
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 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
9
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
false
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
TMA-Crossing
primaryTakeProfitType
Additional Take Profit Type
string
Range-Based
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.
The Chained Linear Regression Reversal Strategy plots linear regression channels with upper and lower standard deviation bands directly on the price chart across a user-defined time window. When price breaks out of the static channel for a confirmed number of
Traiversal A001 is a breakout reversal strategy designed primarily for cryptocurrency trading. It identifies reversal entry opportunities three candles following a breakout and closes positions when a breakout in the opposite direction occurs. The script inclu
RG Structure v2.0 [Visual Edition] is a strategy that identifies pivot points over a lookback window to construct trendlines. It evaluates breaks and retests of these trendlines using scoring weights, violation penalties, and regime detection to generate entry
This strategy operates directly on the price chart to generate trading signals across four switchable modules: trend following, mean reversion, momentum breakout, and smart money concepts. It triggers trade entries when a user-defined minimum number of modules
Sapphire Fibonacci Strategies is a multi-mode strategy that combines Momentum Breakout, Mean Reversion, and Fibonacci Retracement models built on Fibonacci-period moving averages. It generates long and short trade signals based on price crossovers and moving a
This overlay strategy combines an AlphaTrend core with kinematic, Bayesian, and mean-reversion models, plus harmonic, classical, and candlestick pattern engines. It plots consolidation zones, volume-profile points of control, pattern lines, and forward forecas