1Copy the scriptPress Copy script above, or the copy button on the code below.
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
61 lines of Pine Script v6 from Strategy.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
Strategy.pine
//@version=6
// MIT License (Modified: No Selling Allowed)
// Copyright (c) 2025 TPTBusiness
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense,
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// Note: This license has been modified from the standard MIT License to prohibit selling the Software.
strategy(title = 'VAMO Crossover Strategy', shorttitle = 'VAMO Strat', overlay = true, pyramiding = 0, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, currency = currency.USD)
// Inputs for VAMO (matching the indicator)
momLength = input.int(14, title = 'Momentum Length', minval = 1)
volLength = input.int(14, title = 'Volatility Length (ATR)', minval = 1)
signalLength = input.int(9, title = 'Signal Line Length (EMA)', minval = 1)
obLevel = input.float(70, title = 'Overbought Level', minval = 0)
osLevel = input.float(30, title = 'Oversold Level', minval = 0)
// Strategy-specific inputs
riskPerTrade = input.float(1.0, title = 'Risk per Trade (%)', minval = 0.1, maxval = 5.0)
tpMultiplier = input.float(2.0, title = 'Take Profit Multiplier (x Risk)', minval = 1.0)
volFilter = input.float(1.5, title = 'Volatility Filter Multiplier (avoid high vol)', minval = 1.0)
// Recalculate VAMO in the strategy (to keep it self-contained, but you could use request.security() for external indicator)
momentum = ta.roc(close, momLength)
volatility = ta.atr(volLength)
vamo = momentum / volatility * 100
signal = ta.ema(vamo, signalLength)
// Trade conditions
longCondition = ta.crossover(vamo, signal) and vamo < obLevel and volatility < ta.atr(volLength * 2) * volFilter // Enter long: crossover up, not overbought, low vol
shortCondition = ta.crossunder(vamo, signal) and vamo > osLevel and volatility < ta.atr(volLength * 2) * volFilter // Enter short: crossover down, not oversold, low vol
// Risk management
atrStop = ta.atr(volLength)
stopLossDistance = atrStop // Stop-loss at 1x ATR
takeProfitDistance = atrStop * tpMultiplier // TP at 2x ATR (or custom multiplier)
// Entries
if longCondition
strategy.entry('Long', strategy.long)
strategy.exit('Exit Long', 'Long', stop = close - stopLossDistance, limit = close + takeProfitDistance)
if shortCondition
strategy.entry('Short', strategy.short)
strategy.exit('Exit Short', 'Short', stop = close + stopLossDistance, limit = close - takeProfitDistance)
// Plot strategy elements on chart
plotshape(series = longCondition, title = 'Long Entry', location = location.belowbar, color = color.green, style = shape.triangleup, size = size.small)
plotshape(series = shortCondition, title = 'Short Entry', location = location.abovebar, color = color.red, style = shape.triangledown, size = size.small)
Overview
VAMO Crossover Strategy calculates momentum using Rate of Change divided by ATR and generates trade signals when VAMO crosses its EMA signal line. Long and short entries are filtered by overbought or oversold thresholds and a dynamic ATR volatility filter. The strategy sets risk management exits automatically using a 1x ATR stop loss and a customizable ATR-based take profit multiplier. All entry signals are plotted directly on the main price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Momentum Length
int
14
momLength
Volatility Length (ATR)
int
14
volLength
Signal Line Length (EMA)
int
9
signalLength
Overbought Level
float
70
obLevel
Oversold Level
float
30
osLevel
Risk per Trade (%)
float
1.0
riskPerTrade
Take Profit Multiplier (x Risk)
float
2.0
tpMultiplier
Volatility Filter Multiplier (avoid high vol)
float
1.5
volFilter
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 strategy overlays three exponential moving averages on the price chart, with periods of 9, 50, and 200. It calculates a MACD histogram from a 1-minute timeframe, applies Bollinger Bands to the histogram, and tracks two RSI oscillators of different lengths
LuxAlgo Hybrid Gold Scalper is a price-chart strategy aimed at gold. It stacks a fast, slow, trend and 200-period bias EMA to mark trend direction, then filters strength with RSI, ADX and an intraday VWAP. Swing highs and lows are marked from pivot length. Set
This trend-following scalping strategy combines a moving average trend filter with the Absolute Strength Histogram indicator. It opens long positions when price is above a selectable baseline moving average and the histogram signals bullish momentum, and short
This strategy draws on the price chart and combines a momentum zigzag, a custom QQE built from RSI, ADX directional strength, an SSL filter, and a coefficient-of-variation weighted average. Box period, deviation, and threshold inputs set the box filter, while
This overlay strategy looks for Bollinger Band and optional fractal sweeps only in the Supertrend direction, with an optional MACD filter. Long and short setups expire after a set number of bars, and the first bar after a Supertrend flip is ignored. It enters
This strategy executes mean-reversion trades using Bollinger Bands combined with a fast RSI oscillator and MACD confirmation. It enters long or short positions when price reaches band extremes during oversold or overbought RSI levels, with optional MACD trend