This script is based on Rob Hoffman's trading strategy. I do my best to implement and cover all necessary parts for the complete strategy, including multiple moving averages and Hoffman's retracement strategy according to bars (45%).
Difference that I do on my own is that my script follow the trend, based on SMA50, so script will not give you Long signals, including bar retracement signals, if price is not above the SMA50, while for Short signal is opposite rule. Long/Short signal will always show only in case if complete bar is away of SMA5, which means completely above for Long, or completely below SMA5 for Short. In that case SL will be on SMA5.
There is two ways to control take profit and stop loss lines, one with auto calculated - according to SMA5, and the other way is to put your desired % for SL and TP. First-Auto way is always calculate % differences between open position and SMA5, so in that case position of SMA5 will be SL while TP will be in size 1:1.5 .
I hope this script means something to someone. If there is some more tips-ways to improve it do not hesitate to contact me.
Best Regards to All of You!