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
2 registered members (AndrewAMD, Imhotep), 567 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
AssetsXXX.csv fields #477901
08/13/19 10:30
08/13/19 10:30
Joined: Apr 2019
Posts: 53
Canada
A
aelagha Offline OP
Junior Member
aelagha  Offline OP
Junior Member
A

Joined: Apr 2019
Posts: 53
Canada
I would like to confirm two things:
1- The parameters in the assets csv file are only used for backtesting except the asset symbol. Is this correct? i.e for live trading real or demo, all parms are pulled from the broker.
2- once connected to the broker, the info is pulled from the broker and the \log\assets.csv file is updaed. So, I can rely on this info like spread, leverage, commission to be accurate.

Thanks for your help.

Last edited by aelagha; 08/13/19 10:47.
Re: AssetsXXX.csv fields [Re: aelagha] #477903
08/13/19 11:04
08/13/19 11:04
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
In Live mode, Zorro will request this information from your respective broker plugin, and if the info is available, the plugin will supply it.

Now, whether or not the info is wrong? You must evaluate how well your particular broker plugin does this. If it is wrong, I would suggest using the SET_PATCH brokercommand to disable the flow of misinformation, so that you can supply your own overrides.

SET_PATCH is described here:
https://zorro-project.com/manual/en/brokercommand.htm

Re: AssetsXXX.csv fields [Re: aelagha] #477914
08/13/19 19:31
08/13/19 19:31
Joined: Apr 2019
Posts: 53
Canada
A
aelagha Offline OP
Junior Member
aelagha  Offline OP
Junior Member
A

Joined: Apr 2019
Posts: 53
Canada
Got it. Thank you sir.

Re: AssetsXXX.csv fields [Re: aelagha] #480007
05/13/20 02:44
05/13/20 02:44
Joined: Jan 2020
Posts: 32
L
leohermoso Offline
Newbie
leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 32
Is it possible to provide an example with brokerCommand(SET_PATCH, 16 + 32 + 64); that works? Where I should place it?

"The broker command must be issued before you load the assets so that it does not override your asset list settings."

Is it possible to show a coding example?

Re: AssetsXXX.csv fields [Re: aelagha] #480011
05/13/20 10:53
05/13/20 10:53
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
If you don’t know what that means, then just put it at the top of your run() function.

Re: AssetsXXX.csv fields [Re: aelagha] #480012
05/13/20 12:02
05/13/20 12:02
Joined: Jan 2020
Posts: 32
L
leohermoso Offline
Newbie
leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 32
Andrew, tks for your reply!

Sometimes for non-English speakers, some phrases are not easy to grasp.

The reason I insisted on this question is I am putting exactly on top of my run function, yet I still get warning 054

Code
DLLFUNC void run()
{
	brokerCommand(SET_PATCH, 16 + 32 + 64);
	NumCores = 12;
	assetList("AssetsDefault.csv");
	set(PLOTNOW + LOG + PARAMETERS + FACTORS + TICKS + RISKLIMIT);
	BarPeriod = 60;
	LookBack = 600;
	StartDate = 2019;
	NumWFOCycles = 12;
	DataSplit = 80;
	Capital = 2500;
	StartWeek = 72100;
	EndWeek = 52100;
	BarMode = BR_WEEKEND + BR_SLEEP;
	OptimalFRatio = 3;
	if (Train)
	{
		Detrend = TRADES;
	}

	if (ReTrain) {
		UpdateDays = -1;
		SelectWFO = -1;
		reset(FACTORS);
	}

	static std::map<std::string, bool> tradeOpen;
	static std::map<std::string, int> isTaken;
	if (is(INITRUN))
	{
		brokerCommand(SET_ORDERTEXT, (DWORD)LABEL);
	}

	while (asset(loop(Assets)))
	{

		MyAlgoGoesHere();
	}
}



I don't know if for DLLs there is a special way to declare the set_patch! If you could enlighten this again for me I'll be very thankful

best regards

Leo Hermoso

Re: AssetsXXX.csv fields [Re: aelagha] #480015
05/13/20 13:02
05/13/20 13:02
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Your SET_PATCH call appears to be correct. Perhaps your plugin is not respecting the SET_PATCH call?

What is your exact warning message? Which broker plugin?

Re: AssetsXXX.csv fields [Re: aelagha] #480019
05/13/20 16:25
05/13/20 16:25
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
If MT4/5 maybe this is relevant?

https://zorro-trader.com/manual/en/mt4plugin.htm#remarks

Some MTR4/5 servers need a long time for the initial access of the price history of previously unused assets.
This can cause a timeout. The strategy will then not start, and a Error 054 or Error 055 message is displayed.
In that case just restart the strategy by clicking [Trade] again.
Inbetween the server had enough time to upload the missing asset.
You might need to repeat that step a few times until all assets load properly.

Re: AssetsXXX.csv fields [Re: aelagha] #480075
05/18/20 14:52
05/18/20 14:52
Joined: Jan 2020
Posts: 32
L
leohermoso Offline
Newbie
leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 32
Sorry for the very late reply, but these are the messages I am receiving. Looks like the plugin is using lotamount instead of pipcost.

In my experience the way the plugin is calculating the fields is wrong. For example, PIP should be pow(10,-pipposition).


I followed dana advice and started and restarted to bot a lot of times, but always I have the same Warning 054 message.

If you are interested I can share the change I made to EA that runs on MT5. With those changes, I don't get warning 054 messages, as I changed the logic to calculate the desired fields.

Best Regards.

Leo Hermoso

Attached Files zorro error.PNG
Last edited by Leohermoso; 05/18/20 14:54.
Re: AssetsXXX.csv fields [Re: aelagha] #480081
05/19/20 05:36
05/19/20 05:36
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Send the changes to Zorro support by mail, they should evaluate it, maybe it is relevant for more than one person.


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