Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #484687
11/30/21 19:43
11/30/21 19:43
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi @kzhao,

Question re. order text. The docs say

Code
// Use borkderCommand(SET_ORDERTEXT, xxxx) to set a custom order text
brokerCommand(SET_ORDERTEXT, "MyAlpacaOrder");  // "MyAlpacaOrder" will be added into ClientOrderId
enterLong(5);


Is there a default for order text? Rather than having to explicitly set it each time, a good default might be "<strategy>-<algo>"?

Thanks.

Re: AlpacaZorroPlugin v1.2.0 Released [Re: DdlV] #484688
11/30/21 19:54
11/30/21 19:54
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by DdlV
a good default might be "<strategy>-<algo>"?
This is impossible because the broker plugin does not have access to this information. The script writer has access to this information and can set it via brokercommand.

Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #484689
11/30/21 22:30
11/30/21 22:30
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
As @AndrewAMD said, the plugin doesn't know anything about the strategy.

Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #484693
12/01/21 18:04
12/01/21 18:04
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks @AndrewAMD, @kzhao. Obviously I'm not a plugin writer. laugh Just a lazy scripter... laugh laugh

Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #486066
06/06/22 19:56
06/06/22 19:56
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi @kzhao,

How time flies! Hope you are well.

A new question: In the generated AssetsAlpaca.csv, how is Spread determined? Some Assets are getting huge Spreads...

Thanks.

Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #486069
06/07/22 01:44
06/07/22 01:44
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
Hi DdIV, The spread is the ask price - bid price (lastQuote.ap - lastQuote.bp). For illiquid assets, the spread might be huge.

Re: AlpacaZorroPlugin v1.2.0 Released [Re: kzhao] #486070
06/07/22 07:11
06/07/22 07:11
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks @kzhao.

If I understand you correctly, it's from whatever is the lastQuote existing at the time the brokerCommand(CREATE_ASSETLIST, ...) is run. So, in addition to illiquid assets, it could also be due to "outliers" at the end of trading session if the AssetsAlpaca.csv is created, say, on the weekend?

Is there an easy way to get a more realistic Spread?

Or am I stuck with just plugging a % of Price; or 0?

Thanks.

Page 2 of 2 1 2

Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1