AssetsXXX.csv fields

Posted By: aelagha

AssetsXXX.csv fields - 08/13/19 10:30

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.
Posted By: AndrewAMD

Re: AssetsXXX.csv fields - 08/13/19 11:04

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
Posted By: aelagha

Re: AssetsXXX.csv fields - 08/13/19 19:31

Got it. Thank you sir.
Posted By: leohermoso

Re: AssetsXXX.csv fields - 05/13/20 02:44

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?
Posted By: AndrewAMD

Re: AssetsXXX.csv fields - 05/13/20 10:53

If you don’t know what that means, then just put it at the top of your run() function.
Posted By: leohermoso

Re: AssetsXXX.csv fields - 05/13/20 12:02

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
Posted By: AndrewAMD

Re: AssetsXXX.csv fields - 05/13/20 13:02

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?
Posted By: danatrader

Re: AssetsXXX.csv fields - 05/13/20 16:25

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.
Posted By: leohermoso

Re: AssetsXXX.csv fields - 05/18/20 14:52

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 picture zorro error.PNG
Posted By: danatrader

Re: AssetsXXX.csv fields - 05/19/20 05:36

Send the changes to Zorro support by mail, they should evaluate it, maybe it is relevant for more than one person.
© 2024 lite-C Forums