2) I'm running into an issue with the currentshares calculation. I have multiple entries before my first exit target that is suppose to sell 1/2 the currentshares when triggered. It looks like it is selling 1/2 the shares of the initial entry ( # of shares) and all the shares for the remainder entry orders that triggered before this exit...
If RSI = 1 then
Begin
CurrShares=0;
CurrShares = Currentshares/2;
Sell("RSI") CurrShares shares next bar at market;
End;