A take profit (%) and a trailing stop loss (%) are used.
.) Fast MA > Slow MA and Price > Slow MA and < Oversold Threshold ------> go Long
.) Fast MA < Slow MA and Price < Slow MA and > Overbought Threshold ------> go Short
.) Long entry condition is true and (close >= TP or close <= TSL ) ----> close short position
.) Short entry condition is true and (close <= TP or close >= TSL ) ----> close long position
The strategy performed best on Bitcoin and the most liquid and capitalized Altcoins but works excellent on volatile assets, mainly if they often go trending.
Works best on 3h - 4h time frame.
There's also an optional filter, which opens the position only if the difference between the two slopes is more than a specific value, which can be set in the study inputs. The purpose is not opening positions if the price goes sideways and the noise is way > than the signal.
.) the length is 2;
.) the oversold Threshold is 90%;
.) the overbought Threshold is 10%;
.) by default, the take profit per cent is 0.5%;
.) by default, the trailing stop loss per cent is 0.5%;
.) by default, the fast MA length is 50;
.) by default, the slow MA length is 200;
.) by default, the MA used is .
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.