Hi All, I'm admittedly new to Python/Quantopian and this is my first algo but I've been having the hardest time getting a simple MacD algo working for a Long/Short setup on 5-minute candles... just for a single stock.
I've tried working with several other shared scripts but seems everything is producing errors regarding depreciated api's and modules and then promptly crashing. If anybody would be willing to take a look, or point me in the right direction (to a currently functional MacD script) I'd be very grateful! The idea is to minimize commissions and reduce slippage by entering the longs and shorts as a single trade (ie. when the balance is 100 shares, sell 200 to go 100 short, then on a long signal buy 200 to go long). Thanks!
Details:
MacD Fast: 2, MacD Slow: 400, Length: 3
Stock: UNG
Long (100 shares) on CrossOver, Short (100 Shares) on CrossUnder
5 minute candles,
rebalancing on every tick,
limit order w