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), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
asset subscription mechanism for broker API plugin #459053
04/17/16 19:25
04/17/16 19:25
Joined: Apr 2016
Posts: 38
madpower2000 Offline OP
Newbie
madpower2000  Offline OP
Newbie

Joined: Apr 2016
Posts: 38
I’m trying to develop some broker API plugin for Zorro, but lost a little with mechanism of an asset subscription.

I'm looked thru code at FXCMplugin.cpp - BrokerAsset() function implementation and don't see any code that push data from Broker to Zorro after subscribes an asset was established. Can you explain mechanism, how I should implement broker API event handler, when new data on subscribed asset arrived from broker? How should I pass it to Zorro?

Re: asset subscription mechanism for broker API plugin [Re: madpower2000] #459055
04/18/16 08:26
04/18/16 08:26
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
When a price quote arrives, store it in a list together with the asset name. Then call fpProgress(0) for triggering Zorro. Zorro will then call BrokerAsset() for retrieving the price quote. If fpProgress is not called, the price will be retrieved at the next TickTime period.

Re: asset subscription mechanism for broker API plugin [Re: jcl] #459134
04/24/16 11:27
04/24/16 11:27
Joined: Apr 2016
Posts: 38
madpower2000 Offline OP
Newbie
madpower2000  Offline OP
Newbie

Joined: Apr 2016
Posts: 38
Thanx! Got it, code it!
But, should I unsubscribe, to cancel listening broker quotes? Or leave it until broker logout?

Re: asset subscription mechanism for broker API plugin [Re: madpower2000] #459258
05/02/16 06:49
05/02/16 06:49
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Leave it until logout. Unsubscription is not used by the plugin.


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