Shane Scott: Hi There, I am testing an EA with Lots as an input. But it can only be between 0.1 and 0.9; Why is that? I am new to this just started yesterday. But I'm a coder so not completely retarded. Thanks
There could be a bug in your code, but you should also check the contract specifications of the symbol being traded.
// Variables for Symbol Volume Conditions double dblLotsMinimum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MIN ), dblLotsMaximum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MAX ), dblLotsStep = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_STEP ); // Adjust Volume for allowable conditions double dblLotsAdjusted = fmin( dblLotsMaximum, // Prevent too greater volume fmax( dblLotsMinimum, // Prevent too smaller volume round( dblLots / dblLotsStep ) * dblLotsStep ) ); // Align to Step value

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi There,
I am testing an EA with Lots as an input. But it can only be between 0.1 and 0.9; Why is that? I am new to this just started yesterday. But I'm a coder so not completely retarded.
Thanks