Building a Single-Stock Moving-Average Crossover Strategy in MindGo
Summary
This introductory tutorial explains how to build, backtest, and simulate a daily single-stock strategy in the MindGo platform. It outlines a two-part strategy framework: initialize account settings once, then run trading logic on each active trading interval. The example selects Ping An Bank, reads recent closing prices, and compares a five-day average with a twenty-day average. It buys when the shorter average is higher and exits when it is lower, using account cash and a target holding of zero.
The article describes historical-price retrieval, order functions, and logging, then walks through a backtest setup with dates, starting capital, and daily frequency. It also describes enabling simulated trading and syncing alerts to a mobile app. The evidence is a worked platform example and a reported successful run, not a detailed performance analysis. The logic tests whether one average is above the other rather than explicitly detecting a fresh crossover, and the tutorial does not discuss transaction costs, slippage, position risk, or out-of-sample validation. Its results therefore do not establish profitability.
Key ideas
- MindGo strategies use an initialization function and a repeatedly called data-handling function.
- The example compares five-day and twenty-day averages of recent closing prices.
- It buys when the short average is above the long average and exits when it is below.
- The tutorial demonstrates historical data retrieval, order placement, backtesting, and simulated-trading alerts.
- The example provides no evidence that the strategy remains profitable after costs or in other periods.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.