Volatility Adjusted Momentum
"Volatility Adjusted Momentum" by QuantNomad, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Volatility Adjusted Momentum (v1.0), read 2026-11-15T18:50:53.856Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Volatility Adjusted Momentum by QuantNomad, ported from Pine v5. Pane indicator with 1 plot, 1 fill, 3 levels and 6 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2022-10-25; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
// ------------------------------------------------------------------------------------------------
// Original author: QuantNomad
// Original title: Volatility Adjusted Momentum
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 5
// Fetched: 2026-11-15
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
indicator("Volatility Adjusted Momentum", "VAM", timeframe="", timeframe_gaps=true)
// +++++++++++++++++++++
// ++ INPUT ++
// +++++++++++++++++++++
// Momentum
lenMom = input.int(10, "Length", 1, group="Momentum Settings")
srcMom = input.source(close, "Source", group="Momentum Settings")
upLvl = input.float(3, "Upper Level", group="Momentum Settings")
dnLvl = input.float(-3, "Lower Level", group="Momentum Settings")
// Volatility
optVol = input.string("STD | Standard Deviation", "Volatility", ["ATR | Average True Range", "STD | Standard Deviation"], group="Volatility Settings")
lenVol = input.int(10, "Length", 1, group="Volatility Settings")
// +++++++++++++++++++++
// ++ CALCULATION ++
// +++++++++++++++++++++
mom = srcMom - srcMom[lenMom]
std = ta.stdev(srcMom, lenVol)
atr = ta.sma(ta.tr, lenVol)
// Volatility Adjusted Momentum
val = mom / (optVol == "STD | Standard Deviation" ? std : atr)
// +++++++++++++++++++++
// ++ PLOT ++
// +++++++++++++++++++++
plot(val, "Volatility Adjusted Momentum", val >= upLvl ? color.red : val <= dnLvl ? color.green : color.yellow, 2)
hline(0, "Mid Line", color.gray)
upperLine = hline(upLvl, "Upper Line", color.gray)
lowerLine = hline(dnLvl, "Lower Line", color.gray)
fill(upperLine, lowerLine, color.new(color.purple, 90), "Background Fill")
This file is under the Mozilla Public License 2.0; it is a port of the original by QuantNomad, with the original licence header kept and the changes made for FloScript noted in the file.
- v1
Library refresh 2026-11-15
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.