The period of the first moving average is typically greater than that of the second moving average – implying a two moving averages crossover system. In this case, the second moving average is the slower trending second and the second one is the faster trending signal. If the shift period of the first moving average is set (non-zero), the Auto Trader adds a lag to the first moving average.
If a position is already opened, the Auto Trader does not close it if an opposite signal is received. A position is closed only when the stop-loss or the profit target. The stop-loss and profit-target are specified by the StopLoss and TakeProfit input parameters respectively. When the value of MA2_Period is set to 1, it implies that the current price is used as the second moving average. So in such a case when the first moving average crosses above the price, the Auto Trader enters a SHORT position, and when the first moving average crosses below the price it enters a LONG position. This is effectively a price-Moving Average crossover strategy – entering LONG when price crosses above moving average and entering SHORT when price crosses below moving average.