Problems with custom "QuickOrderSend" function
Please don't just post "4051 error", tell us what the error is so that we don't have to look it up. If you want help, help others to help you.
Hi sorry for the lack of informations, the exact message is "OrderSend error 4051", that translate to "invalid lots amount for OrderSend function", I tried to replace the variable directly by the lots amount I want to use but it didn't work either...
I hope you'll be able to help me ^^ I read on forums that this thing can happen in other cases than with a problem with the lots amount parameter...
Hi sorry for the lack of informations, the exact message is "OrderSend error 4051", that translate to "invalid lots amount for OrderSend function"....
4051 is Invalid parameter value, not Invalid lots.
int Price_Type; { if (SimpleOrder_Type == OP_BUY) Price_Type = Ask; else if (SimpleOrder_Type == OP_SELL) Price_Type = Bid; }
Price_Type should be a double.
Hi everyone,
I'm quite new to the EA trading but I want to learn and improve so I started an EA by myself and learned a bit of MQL4 coding...
So my first EA is about to start "working" but there starts the first problems, I encountered some trouble while trying to use functions to place and close my orders and the 4051 error is appearing when the code tries to place any order. I think that it's because of the way i'm declaring the parameters of the "ordersend" line.
Can anyone help me in any way by looking to my code ? I'm too much of a noob in english and MQL4 coding to find it by myself on internet...
I'm also opened to any advice and critics about my code!
Thanks by advance for your advices!