Hello all traders and quants,

I am comparatively very new to Algo trading. So I wrote this algo to trade based on simple EMA crossover strategy.

Strategy on the lines of - 

There are three EMAs - slow ,fast and medium. I maintain the current price and the one last price in Rolling Window,.

  • BUY signal -  whenever there is a 
    • medium EMA crossing up slow EMA 
    • also the fast EMA is higher than slow EMA
    • then BUY 5% of portfolio amount.
  • SELL signal - it is just opposite of BUY that is same signals but crossing down
  • Now I tried to put in a Trailing SL but yet only on BUY Orders.,
    • If the profit for a symbol is more than 10% then make the SL at current 10% less than current price
    • Also if the fast EMA crosses down medium EMA, then liquidate the BUY orders and same for SELL signals
 

I have attached the backtest based on one of these signals.

Now, my questions

  • I feel the strategy always start good and then mid way it either stops getting the profits or hits a snag. What is the best way to test out the details like how many trades did the algo skipped, or Equity after each day so that I can find a pattern of when the algo starts giving the losses.
  • How can I improve this strategy like the next steps, what additional things I should try? Like I already tried changing EMA time periods and percentage of the portfolio to make each order. What other variations can I try with an algo?
  • Any other suggestions based on Algo
Thank you and feel free to let me know for any questions.! Regards,Ray