Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Indie Game Composer for Hire
by titanicpiano14
9 minutes 25 seconds ago
Starting Zorro
by dpt
Today at 16:51
Lost Key
by jcl
Today at 13:58
Aum119 is ready
by Iglarion
Today at 13:09
Zorro on Linux
by Nanitek
Today at 11:08
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
ZeaL
Who's Online
26 registered (Ch40zzC0d3r, Iglarion, dpt, gtell, Dbat, ezaffa, Dalla, firecrest, alibaba, 2 invisible), 475 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
vivekkumar, Hale75, victrades, htj, anufriyev
17781 Registered Users
Topic Options
Rate This Topic
#468656 - 10/12/17 14:53 Feeding Zorro with price data from a file
Zheka Offline
Junior Member

Registered: 07/03/17
Posts: 55
Jcl,

I want to read continuous quotes from a file to feed Zorro script making calculation off e.g. 10min bars in RT, but without sending orders to a broker.

I have studied your HFT simulation example with NxCore, but need to clarify some things.
1. For Zorro to have price fields available internally, does it have to be a 'broker plug-in'?

2. How does one generally use and implement a callback() function? Which function in the Broker plugin should call it? There is no documentation.

3. In NxCore example callback() returns 1. Does this have any meaning?

4. If I set ticks read from a file via priceQuote() - like in an NxCore example - would Zorro then automatically build bars and fill in its internal t6 structs?

5. if (4) is Yes, then If a price in PriceQuote() is negative, it is considered Bid. Would Zorro automatically calculate Spread and fill it in the t6 struct?

5. Can I set fields of a t6 structs in the callback() directly? Would be great to have a function like PriceQuote but for *.t6.

Your any other advice is greatly appreciated.

Top
#468660 - 10/12/17 15:46 Re: Feeding Zorro with price data from a file [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 25816
Loc: Frankfurt
It needs not be a broker plugin, it can be any DLL. If it is a broker plugin and you have a callback function in the script, you can use BrokerProgress(ptr) for transmitting information. Look for the description in the manual under "Broker Plugin". An example of such a callback function can be found on the HFT page. What it returns is up to your implementation.

There are no T6 structs at runtime, T6 is only used for historical data. Still you can set the prices and spread directly, either with priceQuote, or with priceSet. As you can imagine, this is pioneer area, AFAIK priceQuote has so far only been used for HFT simulation. When you encounter problems, you know the procedure: email Support and you'll get help.

Top
#468675 - 10/12/17 19:41 Re: Feeding Zorro with price data from a file [Re: jcl]
Zheka Offline
Junior Member

Registered: 07/03/17
Posts: 55
It becomes clearer now. As Zorro creates bars in memory at runtime, would priceSet() do the same (in absense of smaller price ticks and with run() increasing the bar count)?

Or the correct function to use is bar()?
Quote:
The function is called whenever a new price quote arrives
Would calling priceQuote() trigger a call to bar ()?

Another question: if a *.t6 file is updated in realtime, would a script in [Test] mode continue to run and produce trade statistics?

Top
#468679 - 10/12/17 21:28 Re: Feeding Zorro with price data from a file [Re: Zheka]
vles Offline
Newbie

Registered: 10/10/17
Posts: 6
Loc: on
Hi,
I have IB gateway installed tws and zorros.
It connects running z8 displays the changes to portfolio but changes nothing and logs out after run.
How do you have your system set up?

I get no response from admin.

Top
#468698 - 10/13/17 10:52 Re: Feeding Zorro with price data from a file [Re: vles]
Zheka Offline
Junior Member

Registered: 07/03/17
Posts: 55
I did not try to run Z systems - so I cannot answer.Sorry.

Top
#468703 - 10/13/17 13:39 Re: Feeding Zorro with price data from a file [Re: Zheka]
Zheka Offline
Junior Member

Registered: 07/03/17
Posts: 55
Jcl,

Would appreciate your reply.

Top
#468706 - 10/13/17 18:24 Re: Feeding Zorro with price data from a file [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 25816
Loc: Frankfurt
priceSet does not create bars, but it can fill or overwrite price candles.

priceQuote can indeed trigger a call to bar(), at least I would expect that since it is equivalent to the arrival of a tick. But as I said, it has been tested so far for HFT simulation only, so it's not guaranteed that it works for receiving prices during live trading.

Updating a .t6 price history file can have only an effect on the backtest when you do that at test start before selecting the asset.

Top
#468730 - 10/14/17 12:32 Re: Feeding Zorro with price data from a file [Re: jcl]
Zheka Offline
Junior Member

Registered: 07/03/17
Posts: 55
Clear. Thank you.

Top



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net