Recently I developed an algorithm based on a RSI mean crossover which rebalanced every morning 30 minutes after the market opened. The results can be seen here: https://www.quantopian.com/posts/first-strategy-tested-rsi-weighted-mean-crossover
I wanted to transfer this strategy over to a minute calculation to capture changes more frequently in RSI and RSI average values to hopefully get into a position sooner. My results can be seen attached. However, there seems to be a problem with my code placing a new open order every minute that fills, which exceeds the initial capital I have invested. My questions are:
1.) Is there a way to control the number of open orders to 1 until it is completely filled, or until a signal is generated to switch the position, i.e. crossover detected?
2.) Do I have to close out my entire long/short position before initiating a new long/short position? Or can order_target_percent take care of that?
3.) Is there a way to make sure my position, either long or short, does not exceed the available cash in my account?