Posted By: cbase
Adapting to different asset names - 06/28/13 23:27
Currently, I am trying to set up a Z2 test on a demo account with a broker that uses other names for the indices, e.g. I assume that FTSE100 in this broker's portfolio is UK100 in Z2, DAX30 is GER30 and so on. Can I just change the names in the file Data/Z12.fac or does that mess up things?
Roland
Posted By: jcl
Re: Adapting to different asset names - 06/29/13 11:51
That will mess up things. Instead you need to add the name conversion to the assetFix function in the Zorro.mq4 script. Example:
string assetFix(string Asset)
{
if(Asset == "UK100") return("FTSE100");
if(Asset == "GER30") return("DAX30");
...
// rest of the function goes here
}
Posted By: cbase
Re: Adapting to different asset names - 06/29/13 14:22
Thanks, I'll try that ....
Posted By: cbase
Re: Adapting to different asset names - 06/29/13 15:52
I changed the Zorro.mq4 script as you suggested. NAS100 seems to be called NQ100 with the broker I am using, and I also put this conversion into the EA script.
When I click "Trade", Zorro starts collecting the initial data, until it says "Error 053: NAS100 prices unavailable" (nothing about the other assets, though). After that, the program hangs for quite a while (no progress bar, Windows grays out the window), until the last message appears: "Read Z12.fac Z12.par ........................" and the program seems to crash (Windows keeps showing the "blue donut" cursor and the window remains completely unresponsive).
Do I have to enter the changed asset names somewhere else so Zorro can find them on startup?
Posted By: cbase
Re: Adapting to different asset names - 06/29/13 16:05
Okay, I just found the solution myself. I just had not read correctly: NAS100 is not called NQ100 with my broker, but [NQ100]. I have included the brackets now and everything seems to work.