The strategy will go long when stochastic crosses under the oversold area and and price has pulled back to the fast EMA - while price is above the long term EMA. Vice versa for shorts.
The stop loss and take trofit are both based on the ATR. There is a trailing ATR function as well.
I love your work with this script. Thank you for posting! I hope this is not too much to ask, but I was curious about the ATR calculation. Is there any chance you could open up the source code to the public, or perhaps even just share the ATR variable? I was looking to turn this script into a potential fun project to customize for myself. Thanks again for posting!