The base code for this script has been derived from Yellow Flower's 'SMAX Strategy'. The strategy is intended to be used on the 1HR Chart for best results, however it can be used on any timeframe you desire.
The following updates have been implemented:
*Updated to Pine v4. There is no repainting in this script as it does not utilize the security ticker function.
*Position size is no longer fixed to 1 contract. Pyramiding has been removed from the code.
*Various miscellaneous syntax changes to optimise code.
Other Notes:
// Optimised Chart Settings:
// 15m superLength = 48, fastLength = 1536
// 1h superLength = 12, fastLength = 384, TS: 9%, SL: 5%, TP: 68%
// 4h superLength = 3, fastLength = 96
// 1D superLength = 0.5, fastLength = 16