Skip to content
All library documents

Daily Long-Only SMA Crossover Strategy Using Four- and Thirty-Bar Averages

Article TradingView scripts

Summary

This is a simple long-only moving-average crossover strategy intended for daily charts. It calculates short and long simple moving averages from closing prices, using four and thirty bars respectively. A bullish crossover opens a long position if the strategy is not already long; a bearish crossover closes that position. Orders are processed at bar close, and the script plots the averages and marks crossover signals on the chart.

The strategy specifies full-equity position sizing and an initial capital setting, but the document offers no backtest results, comparison, or evidence of profitability. It does not include a short entry, protective stop, profit target, or additional market filter. The daily-chart recommendation is presented as usage guidance rather than enforced logic, so users can apply it elsewhere unless they configure the strategy timeframe. Crossover systems can also respond slowly to reversals and may generate repeated signals in sideways markets; those behaviors are not assessed in the document.

Key ideas

  • A four-bar SMA crossing above a thirty-bar SMA opens a long position.
  • A downward crossover closes an existing long position, leaving the strategy flat.
  • Signals and order processing are based on bar closes, and the stated intended timeframe is daily.
  • The script uses full-equity sizing but provides no performance evidence or protective stop rules.

Tags

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