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
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 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
Trouble using Asset selection from the drop down menu #473058
06/11/18 18:39
06/11/18 18:39
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
This should be an easy one for you more experienced Zorro folks.

I'm having a really hard time trying to use the dropdown Asset selection in a more complex sample scripts, such as OptionSimple.c, which has a hardcoded asset selection, SPY in this case.

I know that the variable "Asset" contains the selection, but every time I try to use it, it just doesn't take it. I want to be able to change the asset selection, press Test, and run the script. Now, I have to change the hardcode in Edit, save to source code file, then Test.

Below is how most of the sample scripts start. What do I have to change to tell the script to use the dropdown menu Asset selection. I tried INITRUN and didn't work, maybe I'm not doing it right.

Many thanks!

============================
void run()
{
StartDate = 20120101;
EndDate = 20151231;
BarPeriod = 1440;
BarZone = ET;
BarOffset = 15*60+20; // trade at 15:20 ET
LookBack = 1;
PlotMode = 0;
set(PLOTNOW);
set(PRELOAD|LOGFILE);

assetList("AssetsIB");
asset("SPY");

Price = priceClose();
contractUpdate("SPYa",0,CALL|PUT);
...
...
...

=========================

Re: Trouble using Asset selection from the drop down menu [Re: SBGuy] #473059
06/11/18 18:44
06/11/18 18:44
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
If you have this:

Code:
assetList("AssetsIB");
asset("SPY");


... then dropdowns are automatically ignored.

But if you leave these lines out, it depends on whether you have Zorro free or Zorro S.

If you have Zorro S, you can set up Accounts.csv to point to an asset list for every broker.

If you have Zorro free, you can set the drop down list by setting the AssetsFix.csv file.

More info here:
http://zorro-project.com/manual/en/asset.htm
http://zorro-project.com/manual/en/account.htm
And the rest of the manual, it's all good. laugh

Re: Trouble using Asset selection from the drop down menu [Re: AndrewAMD] #473088
06/12/18 19:24
06/12/18 19:24
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Ah yes, that did it trick.

Thanks!


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