i am developing strategy that is in the market 100% or the time so i could test the esignal paper trading system.
I am using the generic broker functions buyMarket(getSymbol(),1) and sellShortMarket(getSymbol(),1) and was hoping that when the sell short order is placed, it would automatically close the long position, however the I get an error saying "order has been rejected: you cannot place an open order at the moment. Please close an existing opposite side position first". I then used closeposition() which worked but it does not help as I am only trying just to scale out.
Can anyone point me in the right direction please? Thanks.
I am using the generic broker functions buyMarket(getSymbol(),1) and sellShortMarket(getSymbol(),1) and was hoping that when the sell short order is placed, it would automatically close the long position, however the I get an error saying "order has been rejected: you cannot place an open order at the moment. Please close an existing opposite side position first". I then used closeposition() which worked but it does not help as I am only trying just to scale out.
Can anyone point me in the right direction please? Thanks.
Comment