SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Mar 20, 2023 6:18 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to emit user events?
PostPosted: Sat Feb 23, 2019 12:52 pm 
Offline

Joined: Thu Feb 05, 2015 11:15 am
Posts: 39
How to emit user event in sell side strategy and trigger onUserEvent() in strategies?

For example, it will be good if a sell side strategy, which designed to provide single continue instrument for a chain of commodity contracts, emits a customized event when rolling positions.


Top
 Profile  
 
PostPosted: Mon Feb 25, 2019 10:13 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 583
All events with typeId > 250 are user events.
It means that they will trigger
Code:
Strategy.OnUserEvent(Event ev)


So you need your own event class(derived from Event) and send this event through framework:
Code:
framework.EventManager.OnEvent(e)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group