Gamestudio Links
Zorro Links
Newest Posts
Please consider
by DriftWood
Today at 03:10
Draw stuff from other thread
by Superku
Yesterday at 23:25
Partial fills with MT4 in live trading?
by Sphin
Yesterday at 19:06
New Zorro version 1.83
by DdlV
Yesterday at 13:55
Cubemaps losing mipmaps
by Quad
Yesterday at 12:37
Zorro & virtual desktops & Installation
by jcl
Yesterday at 10:59
ccyStrength() only working for some Currencies
by sdh309795gaas
07/18/18 05:02
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
13 registered (3run, brax, Quad, Hredot, kvm, mk_1, alibaba, jenGs, 3 invisible), 516 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
DJ_Algo, tang, stuvwx210277, refltr, hillab
18002 Registered Users
Topic Options
Rate This Topic
#468656 - 10/12/17 14:53 Feeding Zorro with price data from a file
Zheka Online
Member

Registered: 07/03/17
Posts: 294
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: 26397
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 Online
Member

Registered: 07/03/17
Posts: 294
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: 10
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 Online
Member

Registered: 07/03/17
Posts: 294
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 Online
Member

Registered: 07/03/17
Posts: 294
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: 26397
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 Online
Member

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

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de