This is a script written as an example of how to build a simple strategy with user-defined inputs based on a simple Moving Average crossover.
--
This indicator is used for backtesting Moving Average crossover strategies (only for long trades).
A "short" and "long" moving average period and calculation method (the "smoothing type") are user-adjustable. The trade is triggered when the "short" moving average crosses over the "long" moving average.
A third customizable moving average is provided which is used as a trigger to exit the trade when the *close* of a candle crosses below this "exit" moving average. Again the period and smoothing type are user-adjustable.