Skip to content
All library documents

Awesome Oscillator Momentum Changes as Long and Short Signals

Article TradingView scripts

Summary

This backtest turns changes in an oscillator into directional positions. It calculates the difference between fast and slow simple moving averages of the bar midpoint, then subtracts a fast average of that difference. When the resulting value rises from the prior bar, the script takes or maintains a long position; when it falls, it takes or maintains a short position. An input can invert those directions. The histogram and bar colors visualize the same rising-versus-falling state.

The script uses default fast and slow lengths of 5 and 34, while allowing both to be changed. It provides no stop, profit target, position-sizing rules, transaction cost assumptions, market scope, or reported performance results. The source describes the approach as intended for learning or paper trading, so its presence as a strategy script should not be read as evidence of live-trading suitability. The signal is based on direction of the oscillator’s change, not a threshold crossing around zero, and may switch frequently as the value fluctuates.

Key ideas

  • The oscillator is formed from fast and slow averages of the bar midpoint, followed by a further fast average subtraction.
  • A rising oscillator value signals long exposure, while a falling value signals short exposure.
  • An input reverses the mapping between oscillator direction and trade direction.
  • The script visualizes its directional state with histogram and bar colors.
  • No performance results or risk controls are documented, and the source recommends educational or paper use.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.