Short-Only Moving Average Crossover with Slope and Session Filters
Summary
This strategy opens short positions when a configurable fast moving average crosses below a slow moving average. The averages can each use an exponential, simple, or weighted calculation. An optional slope filter requires both averages to be falling more steeply than their specified thresholds, and an optional intraday filter restricts entries to a defined session. The position closes when the fast average crosses back above the slow average; another setting can force closure when the session ends.
Despite its index-option-selling label, the code shown trades a short position in the charted instrument and does not model options. It allows no pyramiding and enters only when flat. The document supplies parameter defaults but no market, test period, or performance results, so there is no evidence here about profitability. Crossover signals can lag, while slope thresholds, session hours, and trading costs can materially affect behavior. The strategy also relies on the chart's instrument and timeframe, which are not specified in the excerpt.
Key ideas
- A fast-average cross below a slow average triggers a short entry when the filters pass.
- The averages may be exponential, simple, or weighted, with independently configurable periods and sources.
- An optional slope filter requires both averages to decline beyond set thresholds.
- Entries can be limited to an intraday session, with optional closure at session end.
- The code shows short trades in the underlying chart instrument, not option positions, and gives no performance results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.