I recently started learning python, algorithms and data structures. With the help of sentdex from YouTube, I built this algorithm....and it's performing very well. My only question is does the value have to match in the "order_target_percent" of this code (this is in reference to leverage). Thanks for any help!
p == 1 and ma1 > ma2:
order_target_percent(stock,0.25)
elif p == -1 and ma1 < ma2:
order_target_percent(stock,-0.05)