Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 945 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Feeding Zorro with price data from a file #468656
10/12/17 12:53
10/12/17 12:53
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
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.

Re: Feeding Zorro with price data from a file [Re: Zheka] #468660
10/12/17 13:46
10/12/17 13:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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.

Re: Feeding Zorro with price data from a file [Re: jcl] #468675
10/12/17 17:41
10/12/17 17:41
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
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?

Re: Feeding Zorro with price data from a file [Re: Zheka] #468679
10/12/17 19:28
10/12/17 19:28
Joined: Oct 2017
Posts: 10
on
V
vles Offline
Newbie
vles  Offline
Newbie
V

Joined: Oct 2017
Posts: 10
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.

Re: Feeding Zorro with price data from a file [Re: vles] #468698
10/13/17 08:52
10/13/17 08:52
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
I did not try to run Z systems - so I cannot answer.Sorry.

Re: Feeding Zorro with price data from a file [Re: Zheka] #468703
10/13/17 11:39
10/13/17 11:39
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Jcl,

Would appreciate your reply.

Re: Feeding Zorro with price data from a file [Re: Zheka] #468706
10/13/17 16:24
10/13/17 16:24
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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.

Re: Feeding Zorro with price data from a file [Re: jcl] #468730
10/14/17 10:32
10/14/17 10:32
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Clear. Thank you.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1