User rating: 98
Joined: Mon 23 Jul, 2012, 02:02 Posts: 656 Location: United States, Durham, NC
In IEngine.submit, there is no option to influence the OfferSide used in the StopLoss. The default is usually ok.
But in IOrder.setStopLoss we are able to select the stop OfferSide. Whether the SL is triggered on the Bid side or on the Ask side.
This means that if we want to take the "non default" OfferSide for a StopLoss, we can't specify it in IEngine.submit, but have to specify it later in IOrder.setStopLoss using the OfferSide argument.
Is this correct? It would be nice of the StopLoss OfferSide could be specified in IEngine.submit .
Is this correct? It would be nice of the StopLoss OfferSide could be specified in IEngine.submit .
Yes it is correct, but we don't plan to add additional IEngine.submit overloading method for the sake of this.
hyperscalper
Post subject: Re: setStopLoss OfferSide
Post rating: 0
Posted: Tue 18 Feb, 2014, 17:35
User rating: 98
Joined: Mon 23 Jul, 2012, 02:02 Posts: 656 Location: United States, Durham, NC
OK, that's fine, no need for the overload.
EDIT CORRECTION: Mea Culpa, I had a bug in my code, so there is no bug in the stop loss offer side behavior. THANKS !
Stop Loss offer side works correctly.
Take the case of a LONG position, the standard Stop Loss side will be the BID. This is to ensure that the Market SELL will be as close as possible to the precise stop loss desired. So we see the condition in the JForex platform shown as BID<=<stopprice>
When I replace the existing stop loss for a LONG order, and use the OfferSide ASK we should see the condition displayed in the orders table as ASK<=<stopprice>. Isn't this what I should expect to see?
I have a task which checks all Stop Losses, and determines their OfferSide. If this does not match the desired side, then the Stop Loss is replaced using the desired OfferSide as follows: