This is a little algorithm I wrote based off the popular SPY 200MA trading strategy. I am fairly happy with returns and have no problems with liquidity. I would like help however reducing the draw down, but I am having trouble figuring out how to do that without increasing the frequency at which the algorithm trades, as I have noticed that returns take a hit at higher frequencies for my algorithm. Draw down can be reduced by lowering the target percent ordered in the trade function of the algorithm, but at the same time returns are also lowered. Greatest draw downs occur when the market takes a hit and the algorithm isn't scheduled to trade during the market hit. Any help is greatly appreciated. Also, I am new to this so I apologize if there is any glaring errors or oversights with the algorithm.