darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
166 stars 88 forks source link

Zero Max Lot Size? #22

Closed sorul closed 1 year ago

sorul commented 2 years ago

I have gotten the following error more than once. What is the point of the maximum lot size being 0.000? Why does this happen?

('ERROR', '|', 'OPEN_ORDER_LOTSIZE_OUT_OF_RANGE', '|', 'Lot size out of range (min: 0.000000, max: 0.000000): 0.010000')

Thank you.

elvinex commented 1 year ago

Hi, The mql code returns this error when the lot size is larger than MarketInfo(symbol, MODE_MAXLOT).

It seems that MODE_MAXLOT returned zero. My first guess would be that the symbol you are trying to trade is not tradable or does not exist (maybe different suffix). Or maybe it is an MT4 bug.