A Short Moving Average Crossover Strategy with Entry and Exit Filters
Summary
This Chinese-language tutorial builds a simple automated moving average crossover strategy and explains its main loop, account queries, trade actions, logging, and polling interval. It uses separate fast and slow period settings for entries and exits, with configurable observation thresholds, position sizing as a share of account holdings, and an interval between checks. The strategy opens a long or short position when the entry crossover threshold is reached, then closes it when an opposing exit crossover meets its threshold.
The article also introduces basic JavaScript concepts and describes the trading platform functions used by the example. It shows a deployment walkthrough, but provides no backtest methodology, market, timeframe, or verified performance evidence. Its claim of positive returns is unsupported in the supplied text, and the sample’s practical suitability depends on platform behavior, asset conventions, execution, and risk controls that are not fully discussed.
Key ideas
- The example enters positions using a fast and slow moving average crossover with an observation threshold.
- It applies separate crossover periods and a threshold to determine when to close a position.
- Position size is set as a configurable fraction of the account’s holdings.
- The tutorial demonstrates platform API calls and a continuously polling strategy loop.
- No backtest evidence or detailed risk controls are supplied.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.