Strategy · Pine Script v6 · On the chart

STT ExitOnly Trade Plan Directional

by majohnst

This strategy implements directional trading plans inspired by small-cap momentum patterns, incorporating Triangular Moving Average (TMA) crossings, VWAP thresholds, and breakout logic.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code2,113
Settings40inputs
LicenceNone stated
Last update3 months ago1 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

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.

Details

Published by

majohnst on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Moving averages, Breakout, Sessions & time

Markets

Stocks

Timeframes

M15-H1

Risk Notes

  • The strategy enters trades without a stop loss

Settings

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

SettingTypeDefaultVariable
Script TitlestringSTT ExitOnly Trade Directional StrategyscriptName
Show label on chart?boolfalseshowLabel
Entry TypestringTMA-CrossingprimaryEntryType
Entry Type Addition Logical MethodstringoradditionalEntryTypeLogic
Price Trigger TypestringClosemainTriggerPriceType
Limit Only One Trade Per DayboolfalseoneSignalPerDay
Enable Daily ClosebooltruecloseDaily
Trade types allowedenumTradeDirection.LongtradeDirectionSelected
Hour (ET) to begin allowing trade entryint8dailyEntryWindowStartHour
Minutes after Hour to begin allowing trade entryint30dailyEntryWindowStartMinute
Hour (ET) to force daily trade exitsint15dailyExitWindowStartHour
Minutes after Hour to force trade exitsint30dailyExitWindowStartMinute
Show all 40 settings
SettingTypeDefaultVariable
Force Exit Buffer Minutesint15exitBufferMinutes
Allow Trading Alerts in Extended HoursbooltrueallowETH
Trigger Entry Enable Hour (ET)int9triggerHour
Trigger Entry Enable Minuteint45triggerMinute
Include Pre-Market HighboolfalseusePreMarketHigh
Max Float Size (M)float20.0floatSize
Volume Multiplierfloat1.0volumeMultiplier
Min Percent Gain (%)float25.0percentGain
Trade Entry Additional TypestringBreakoutadditionalEntryType
Entry Requires TMA bullish statebooltruetmaEntry_required
Entry Requires Price Above VWAPboolfalsevwapEntryRequired
Exit Requires Price Below VWAPboolfalsevwapExitRequired
Exit Requires TMA bearish statebooltruetmaExitRequired
Use Price Only (disables all others)boolfalsemanualPriceOnly
TMA trigger typeenumTmaTriggerType.CrossingtmaCrossingType
Primary Stop TypestringRange-BasedprimaryStopLossType
Stop Type Addition Logical MethodstringoradditionalStopLossTypeLogic
Additional Stop TypestringTMA-CrossingadditionalStopLossType
Primary Take Profit TypestringRange-BasedprimaryTakeProfitType
Additional Take Profit TypestringTMA-CrossingadditionalTakeProfitType
Take Profit $1 Range Start float0.07tpAmount
Use Range Based Stop/ProfitsbooltruerangeBased
Long starting value at $1float0.08rangeBasedInit
Short starting value at $1float0.12shortBasedInit
Trailing Stop (0.0=disabled)float0.07tsAmount
Trailing Stop Minimum Profitfloat0.05tsMinProfit
Stop Typestring$tsType
Limit to under $1000 close.booltruepriceAdjust
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

39 stars

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

Strategy v6 BreakoutSessions & time Repaints
Updated 4 days ago · MIT GitHub repository of Futures Intraday Pro (ES/NQ) Strategy
7 stars

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

Strategy v5 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of London SR Cleaner WR (TP 0.20)
3 stars

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

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of EMA Crossover Scott Strategy

ORB Hunter

by nxtaiapp
2 stars

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

Strategy v5 BreakoutSessions & time
Updated 11 months ago · MIT GitHub repository of ORB Hunter

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