Hi Forum ,
Im experimenting with Lot sizes... In my case I try to set the greatest lot allowed. To get this value , I call the function :
acc_info.MaxLotCheck(_Symbol,ORDER_TYPE_SELL,price,100);
which gives me a 7.03
If I do a Sell marketorder with this volume I get the following error:
2013.01.09 14:50:00 2011.05.02 00:36:18 not enough money [exchange sell 7.03 EURUSD at 1.48203]
2013.01.09 14:50:00 2011.05.02 00:36:18 CTrade::OrderSend: [not enough money]
whats wrong here?
thanks for help...
Filip
Hey, what is your "price" for MaxLotCheck?
see the code:
MqlTick lt;
SymbolInfoTick(Symbol(),lt);
price=lt.bid;
Alert("price now bid:",price);
symbol_info.RefreshRates();
double acc_lot_max = acc_info.MaxLotCheck(_Symbol,ORDER_TYPE_SELL,price);
(for selling!)
in my example the price is 1.48203
- www.mql5.com
see the code:
MqlTick lt;
SymbolInfoTick(Symbol(),lt);
price=lt.bid;
Alert("price now bid:",price);
symbol_info.RefreshRates();
double acc_lot_max = acc_info.MaxLotCheck(_Symbol,ORDER_TYPE_SELL,price);
(for selling!)
in my example the price is 1.48203
Maybe you should make the lot a little smaller than "acc_lot_max" because deviration should take into account when selling instantly.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Forum ,
Im experimenting with Lot sizes... In my case I try to set the greatest lot allowed. To get this value , I call the function :
acc_info.MaxLotCheck(_Symbol,ORDER_TYPE_SELL,price,100);
which gives me a 7.03
If I do a Sell marketorder with this volume I get the following error:
2013.01.09 14:50:00 2011.05.02 00:36:18 not enough money [exchange sell 7.03 EURUSD at 1.48203]
2013.01.09 14:50:00 2011.05.02 00:36:18 CTrade::OrderSend: [not enough money]
whats wrong here?
thanks for help...
Filip