Strategy · Pine Script v6 · On the chart

VAMO Crossover Strategy

by TPTBusiness

The VAMO Crossover Strategy is a scalping system that combines momentum and volatility into a Volatility-Adjusted Momentum Oscillator (VAMO).

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code61
Settings8inputs
LicenceMIT
Last update12 months ago1 Nov 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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

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.

Details

Published by

TPTBusiness on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Oscillators & momentum, Volatility & bands, Scalping

Markets

Crypto

Timeframes

M1-M5, M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

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

SettingTypeDefaultVariable
Momentum Lengthint14momLength
Volatility Length (ATR)int14volLength
Signal Line Length (EMA)int9signalLength
Overbought Levelfloat70obLevel
Oversold Levelfloat30osLevel
Risk per Trade (%)float1.0riskPerTrade
Take Profit Multiplier (x Risk)float2.0tpMultiplier
Volatility Filter Multiplier (avoid high vol)float1.5volFilter
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

5 Minute Scalp

by hasnocool
106 stars

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

Strategy v5 ScalpingMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5 Minute Scalp
27 stars

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

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of LuxAlgo Hybrid Gold Scalper

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

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone Absolute Strength Histogram ATR

Box Scalper

by wynnforthework
2 stars

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

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Box Scalper

Hari Sweep Scalper

by godlesscherry
2 stars

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

Strategy v6 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Hari Sweep Scalper

Mean Reversion

by nxtaiapp
2 stars

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

Strategy v5 Mean reversionScalping
Updated 11 months ago · MIT GitHub repository of Mean Reversion

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