Event based operation possible ?

Posted By: jsch

Event based operation possible ? - 07/26/20 07:15

Is is possible to run Zorro in an event based mode?

So when an event is triggered then Zorro does various programmed checks and the script defines whether to enter a trade or not.

Once the trade is active then the normal time based monitoring and decision process for the open position should be in progress.
Posted By: danatrader

Re: Event based operation possible ? - 07/26/20 07:46

Basically, your trading rules are events triggering the trade.
So it already does what you want.

To answer the question try to be more specific, what kind of event, e.g. Trump tweets?
Posted By: dr_panther

Re: Event based operation possible ? - 07/26/20 09:11

You can tell Zorro about the event using a file, which can be locally or somewhere in the internet. There are HTTP, FTP functions and the exec function. Additionally keep in mind that there is a Python and R interface, you could all kind of things.
You can also communicate with Zorro using the Windows registry.
Posted By: Zheka

Re: Event based operation possible ? - 07/26/20 16:26

https://manual.zorro-project.com/trade.htm
https://manual.zorro-project.com/call.htm
https://manual.zorro-project.com/tick.htm
https://zorro-project.com/manual/en/order.htm
Posted By: jsch

Re: Event based operation possible ? - 07/26/20 21:01

The events would come from a message queue, the sources could be various (e.g. Twitter or Scanners). In the meantime I checked the manuals and I think a have the interaction part solved by writing a node.js application that should even support full history simulation and training.

The one additional thing I am not sure about is the main run scope of Zorro. The events would always contain the symbol to check and trade upon. However - everything I have yet understood looks to me as if Zorro always runs everything in a symbol context.

I will only know the symbol / underlying once the event is received. I will know all asset parameters, but from the manual it looks like assetAdd can only be called once earlier. Any ideas how I would solve this?

Posted By: AndrewAMD

Re: Event based operation possible ? - 07/27/20 15:40

You can send messages to the Zorro window handle from another thread or process to initiate a callback from the Zorro thread.
https://manual.zorro-project.com/hwnd.htm
https://zorro-project.com/manual/en/tick.htm (see callback())
© 2024 lite-C Forums