Gamestudio Links
Zorro Links
Newest Posts
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
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 429 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 5 1 2 3 4 5
Re: IB Plugin needs a fix [Re: Zheka] #468597
10/11/17 14:48
10/11/17 14:48
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Yes, but the default is that fast strategies request data faster than slow strategies. You can set this up with TickTime. For streaming data the plugin must trigger a callback function.

Re: IB Plugin needs a fix [Re: jcl] #468609
10/11/17 16:12
10/11/17 16:12
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
According to the manual, TickTime is for triggering tick() function.
Does it also influence frequency of data snapshot requests to the broker api?

Quote:
For streaming data the plugin must trigger a callback function.

Does it mean that in the current IB plugin it is not defined?
Is this then to be used in reqMktData() call?

The context for my questions is not that I want to execute an HFT strategy. It is rather to make sure that O-H-L-C are as correct (reflect full market activity and equal to historical bars) as possible.

Re: IB Plugin needs a fix [Re: Zheka] #468671
10/12/17 15:18
10/12/17 15:18
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Jcl,
please reply..
I am also not clear on why
Quote:
For streaming data the plugin must trigger a callback function.

How does a user-defined callback function relate to the Broker plugin subscribing (or not) to the streaming data updates?

Re: IB Plugin needs a fix [Re: Zheka] #468672
10/12/17 16:24
10/12/17 16:24
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
The answer on both questions is yes - TickTime affects the price request frequency, and the current IB plugin uses no streams. If I remember right, streams cannot be used with portfolio strategies.

The mentioned callback function is BrokerProgress, to be called on incoming ticks. If the function is not called, the request frequency is determined by TickTime.

Re: IB Plugin needs a fix [Re: jcl] #468676
10/12/17 17:59
10/12/17 17:59
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783

THANKS!

Re: IB Plugin needs a fix [Re: Zheka] #469189
11/07/17 17:38
11/07/17 17:38
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Dear JCL,

I have provided to support all the logs/evidence that IB plug-in requires a rework. They accepted it, but the timing is "next time" - which does not help things a bit.

In addition, the requested increase in the number of ticks Zorro stores/plugin requests came implemented as a read-only field to "GET" (what's the use of this??) - as confirmed by Support, - contrary to what's written in the manual and intention
Quote:
The GET_MAXTICKS broker command allows downloading historical data in bigger chunks than 300 ticks
And IB Plugin does not seem to support it anyway.

Would it be possible to rework the IB plug-in sooner rather than later?
It is barely usable in production in its current form + IB API has undergone quite some changes over the last year.

Thank you very much in advance.

Re: IB Plugin needs a fix [Re: Zheka] #469198
11/08/17 07:27
11/08/17 07:27
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I do not really understand the objection against GET_MAXTICKS, but can confirm that the IB rework is planned for quite soon and will include several changes. For instance switching the price source from ask/bid to trades.

Re: IB Plugin needs a fix [Re: jcl] #469202
11/08/17 09:54
11/08/17 09:54
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
The objection against GET_MAXTICKS is that it is a READ-ONLY field, and so does not allow the end user to experiment with changing this value.
And the plug-in developer knows about this value anyway and would not access it via BrokerCommand(). What would be the use case for this command for the end-user?
Please let's make it also "settable".

Great news for the IB plug-in! I have 2 suggestions:
- for FX/metals let's report *mid-point*- as provided by IB - as Trades. There are no Trades per se for these assets.
- let's also implement IB's *5-sec True RT bars*.
Such 5-sec bar encompasses ALL ticks and comes with a 250-300ms delay - which is good enough for anybody trading at 10-15min+ resolution.
These bars come already cleaned from IB's Historical servers; are exactly equal to the "Historical bars" one can download from IB - and so can be saved to *.t6 structs already in RT (either as 5-sec or as 1min).
250-300ms delay - and you can trade exactly what you would have tested on!

For this to work properly in all cases, Zorro should ideally allow sending a real stop order to the broker (like it already allows with limit orders), not just simulate it.

Re: IB Plugin needs a fix [Re: Zheka] #469204
11/08/17 10:43
11/08/17 10:43
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
GET_MAXTICKS is not for the end user, but instructs Zorro to download data in the returned packet size. The plugin developer, not the end user, is supposed to experiment with this value.

The price source switch command could also be used for switching to RT bars. It they are not a big hassle to implement, we can include them.

Zorro can send real stops to the broker, but the IB plugin does not support them. AFAIK the IB API has no stop order, but requires two orders instead.

Re: IB Plugin needs a fix [Re: jcl] #469211
11/08/17 16:03
11/08/17 16:03
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Quote:
GET_MAXTICKS instructs Zorro to download data in the returned packet size.
So, can a plugin developer SET this value to experiment? Or you set it?
Let's set it to 2500-3000 for IB by default - as per IB's recommendation!

Quote:
If they are not a big hassle to implement, we can include them
They should not be. Would be really great to save them to *.t6 structs in RT.

Quote:
AFAIK the IB API has no stop order, but requires two orders instead
IB API offers a huge variety of orders. Depending on the exchange, some are native and some are simulated. https://interactivebrokers.github.io/tws-api/basic_orders.html#stop

Stops are mostly simulated, but they would definitely be effected much faster by IB, then by Zorro. So, please implement BrokerStop() for IB.

- Limit orders are native for most exchanges; but what Zorro actually implements instead is a "30-sec Stop-limit" order (via ORDERLIMIT flag+SET_LIMIT BrokerCommand).
Please add a BrokerLimit() command to allow placing resting limit orders (or a similar functionality to do that).

Overall, most limitations on orders mentioned in the manual re NFA are handled by IB internally; So, a Stop or TakeProfit can safely be sent as Stop and Limit order by the plug-in; without asking the user to separately call a BrokerStop() or BrokerLimit()/ ORDERLIMIT. It is less efficient/costlier to handle them on Zorro's side.

Some other wishes:

- OrderIDs - please return OrderId, instead of TradeIDs (=0 because they are not supplied by IB)

- please return Api Errors and Order State/ Rejection reasons

- please extend or allow to extend order(int type):
IB has a lot of great order algos, and there should be a way to use them from within Zorro. "Trails" and OCA, Combos have native IB implementations.

- please allow to receive IV/Greeks from IB

Thank you!

Page 3 of 5 1 2 3 4 5

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