My EA Uploaded to the market——Feedback the automatic test results,what happened?

 

Has anyone ever met?

 

Invalid volume .... broker does not allow to trade 0.01 lot size for this account? so - download more historical data (is it MT4 or MT5) and try to change lot size to 0.1.

 
Maybe you have to use
NormalizeDouble() for the lot size
 
Yong Zhang: Has anyone ever met?

Your code should always check the broker's conditions for allowable volume/lots. Use the "SymbolInfoDouble()" function to obtain the correct details for:

SYMBOL_VOLUME_MIN

Minimal volume for a deal

double

SYMBOL_VOLUME_MAX

Maximal volume for a deal

double

SYMBOL_VOLUME_STEP

Minimal volume change step for deal execution

double

SYMBOL_VOLUME_LIMIT

Maximum allowed aggregate volume of an open position and pending orders in one direction (buy or sell) for the symbol. For example, with the limitation of 5 lots, you can have an open buy position with the volume of 5 lots and place a pending order Sell Limit with the volume of 5 lots. But in this case you cannot place a Buy Limit pending order (since the total volume in one direction will exceed the limitation) or place Sell Limit with the volume more than 5 lots.

double

 
Mohammad Soubra:
Maybe you have to use
NormalizeDouble() for the lot size
I have checked it, not for this reason.I deleted NormalizeDouble() ,The result is the same,Is there a possibility of historical data
 
Yong Zhang:
I have checked it, not for this reason.I deleted NormalizeDouble() ,The result is the same,Is there a possibility of historical data

You should read and apply Fernando advice.

There are plenty of topics about this issue on the forum.

 
Yong Zhang: I have checked it, not for this reason.I deleted NormalizeDouble() ,The result is the same,Is there a possibility of historical data

You don't use NormalizeDouble. You normalise the volume/lots by aligning it with the Volume Step (SYMBOL_VOLUME_STEP) and checking it against the allowable Minimum (SYMBOL_VOLUME_MIN) and Maximum (SYMBOL_VOLUME_MAX) values (see my previous post).

 
Fernando Carreiro:

You don't use NormalizeDouble. You normalise the volume/lots by aligning it with the Volume Step (SYMBOL_VOLUME_STEP) and checking it against the allowable Minimum (SYMBOL_VOLUME_MIN) and Maximum (SYMBOL_VOLUME_MAX) values (see my previous post).


Thank you very much for your guidance,I have finished editing it  through this method.

 
阿兰·维利恩:

你应该阅读并应用Fernando建议。

论坛上有很多关于这个问题的话题。


That's right,thank you very much.