Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
IB Options - how to Stop Loss ? #469322
11/10/17 20:49
11/10/17 20:49
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
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();
}

Re: IB Options - how to Stop Loss ? [Re: vinsom] #469335
11/11/17 12:15
11/11/17 12:15
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
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.

Re: IB Options - how to Stop Loss ? [Re: jcl] #469342
11/11/17 18:34
11/11/17 18:34
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
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. "


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1