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
2 registered members (flink, AndrewAMD), 656 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Asset Names and Z strategies #439987
04/14/14 16:26
04/14/14 16:26
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
Quick question. When our broker uses their own names for certain assets, how do we get Zorro to recognise them, when using the Z strategies? As we can't amend the script, is there another way?

Thanks.

Thirstywolf

Re: Asset Names and Z strategies [Re: Thirstywolf] #439991
04/14/14 19:57
04/14/14 19:57
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi Thirstywolf. I assume you're using MT4? See this manual page: http://zorro-trader.com/manual/en/mt4plugin.htm.

HTH.

Re: Asset Names and Z strategies [Re: DdlV] #439997
04/15/14 03:33
04/15/14 03:33
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
Thanks Ddlv.

I guess the problem I have is that I find these instructions a bit vague.

"For this edit the assetFix function in the Zorro.mq4 EA and add the names to the list for converting them to the special asset names of your broker's MT4 version."

How do we edit the assetFix function in the Zorro.mq4?

Thanks

Thirstywolf

Re: Asset Names and Z strategies [Re: Thirstywolf] #440005
04/15/14 10:43
04/15/14 10:43
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
OK. I have figured it out. My issue was that I could not find the Zorro.mq4 file. My bad. I must have searched for the wrong file name, as I could not find it previously.

Might I suggest that the manual remarks be updated to reflect "For this edit the assetFix function in the Zorro.mq4 EA located in the source folder" or something to this effect, just to cater for some slower members of the team such as myself.

Thanks for your help Ddlv.

THirstywolf

Re: Asset Names and Z strategies [Re: Thirstywolf] #440022
04/16/14 01:41
04/16/14 01:41
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
OK. So I have amended the zorro.mq4 file, but zorro seems to be ignoring it. Code as follows:

string assetFix(string Asset)
{
if(Asset == "XAGUSD") return(".SILVER");
if(Asset == "XAUUSD") return(".GOLD");
if(Asset == "GER30") return("DE30");
if(Asset == "NAS100") return("US500");
if(Asset == "SPX500") return("USTEC");
if(Asset == "USOil") return("WTI");
// replace asset name directly (example)
// if(Asset =="XAGUSD") return("SILVER");
// if(Asset == "XAUUSD") return("GOLD");

// no direct replacement -> add suffix automatically
string s = Symbol();
if(StringLen(s) > 6 && StringLen(Asset) <= 6) {
s = StringSubstr(s,6,StringLen(s)-6);
Asset = StringConcatenate(Asset,s);
static bool once = true;
if(once) {
Print("Adding ",s," to asset names");
once = false;
}
}
return(Asset);
}

Even with this file saved in the source folder, Zorro cannot find these symbols. Any suggestions?

Re: Asset Names and Z strategies [Re: Thirstywolf] #440025
04/16/14 03:34
04/16/14 03:34
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
Does the Zorro.mq4 file need to be put into a different folder or something? I can't see that any of the changes that I make in this file affect the way Zorro runs.

Re: Asset Names and Z strategies [Re: Thirstywolf] #440027
04/16/14 08:05
04/16/14 08:05
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Zorro.mq4 is a MT4 expert advisor. It must be in the MT4 "Experts" folder as described in the manual.

Re: Asset Names and Z strategies [Re: jcl] #440035
04/16/14 09:39
04/16/14 09:39
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline OP
Junior Member
Thirstywolf  Offline OP
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
Hi JCL. Thanks for the advice. Only issue is that I am using MT4 version 600, which I just realised is why I do not have Zorro.mq4 in the experts folder, as I have .ex4 instead. Is .ex4 an editable file?

Thanks

Thirstywolf

Re: Asset Names and Z strategies [Re: Thirstywolf] #440037
04/16/14 10:07
04/16/14 10:07
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
No, .ex4 is the compiled version. V600 can not run the Zorro.mq4 from earlier Zorros. Download the new Zorro 1.22 from the "Starting" forum - it contains a different MT4 bridge for V600.

Re: Asset Names and Z strategies [Re: jcl] #440039
04/16/14 12:16
04/16/14 12:16
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
also beware your error in assets:

if(Asset == "NAS100") return("US500"); should be USTEC

if(Asset == "SPX500") return("USTEC"); should be US500


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1