IB Options - how to Stop Loss ?

Posted By: vinsom

IB Options - how to Stop Loss ? - 11/10/17 20:49

Hi,
I would like to try to tes an option strategy with stop loss.
But when I have multple contracts, how to set the stop that from my understanding is per asset and not per contract ?
And how to set the stop with the ATR of the contractPrice , in the snippet below ?
Any help appreciated.
Thanks
Vincenzo

CONTRACT* CallLong = contract(PUT,DTE,Close[0] + spread);
CONTRACT* CallShort = contract(PUT,DTE,Close[0] - spread);


if(!(NumOpenLong + NumOpenShort) && CallLong && CallShort && !is(LOOKBACK) )
{
contract(CallLong);
enterShort();
contract(CallShort);
enterShort();
}
Posted By: jcl

Re: IB Options - how to Stop Loss ? - 11/11/17 12:15

Options have normally no stop loss. But you can implement a sort of stop loss by comparing the current value or profit with a threshold or with a percentage of the premium, either once per bar, or permanently in a TMF.
Posted By: vinsom

Re: IB Options - how to Stop Loss ? - 11/11/17 18:34

Hi Jcl,
This extract below is in the "Futures and options" manual page

"Entry, Stop, and TakeProfit limits also work for trading options and futures, and refer to the ask and bid prices of the contract. They must be given as an absolute price limit, not as a distance. When an exit limit is hit, the contract is sold at market. "
© 2024 lite-C Forums