Hi Everyone,
I am relatively new to programming. I am actually 50% done the python course in code academy. I am really stuck figuring out the logic for what I want to do and was hoping someone would be kind as to point me in the right path. The strategy is using a single security, SSO, to find setups for intraday trades.
For going long I want to spot a setup in the SSO where the 20 day is greater than the 50 day moving average and the stochastics are < 25, there is a positive candle stick function (I only have built one into the current code at the moment), and the close of the signal candle is less than the high of the previous candle (t-3).
The stop will be= (1 * ATR) - low of entry bar
The target exit will be: (2 * ATR) + entry price
If nothing triggers I would like to close the position end of day.
I have included my most recent back test, and I am clearly well off the path. I've looked at a ton of examples but cannot seem to find anything that incorporates multiple variables and closing position daily then resetting next day if the setup presents itself. I'm sure its the fact that I do not understand the language enough yet, as a lot of the models are quite complicated, but any help is greatly appreciated!
Best
Dave