Gamestudio Links
Zorro Links
Newest Posts
CCT PhysX 2.0
by 3run. 05/28/20 23:21
Oanda instruments
by kalmar. 05/28/20 22:16
Issues with Full Screen
by 3run. 05/28/20 17:33
Is Zorro still viable?
by SteveG. 05/28/20 16:28
algo && adviseLong
by Grat. 05/28/20 12:18
Train not save
by Grat. 05/28/20 06:09
MT4/5 Bridge - Zero MQ
by Grat. 05/28/20 05:29
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (Dooley, Grat, henrybane, AndrewAMD, Quad), 508 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
PBSeven, Hardi01, Giuseppe, AdamWu, gariki
18460 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: 15
Canada
A
aelagha Offline OP
Newbie
aelagha  Offline OP
Newbie
A

Joined: Apr 2019
Posts: 15
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: 976
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 976
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: 15
Canada
A
aelagha Offline OP
Newbie
aelagha  Offline OP
Newbie
A

Joined: Apr 2019
Posts: 15
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: 23
L
Leohermoso Offline
Newbie
Leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 23
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: 976
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 976
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: 23
L
Leohermoso Offline
Newbie
Leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 23
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: 976
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 976
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: 117
D
danatrader Offline
Member
danatrader  Offline
Member
D

Joined: Mar 2019
Posts: 117
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: 23
L
Leohermoso Offline
Newbie
Leohermoso  Offline
Newbie
L

Joined: Jan 2020
Posts: 23
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: 117
D
danatrader Offline
Member
danatrader  Offline
Member
D

Joined: Mar 2019
Posts: 117
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