![]() |
How does expiration on pending order works? I have found this line of code but it is not creating a buy limit order if i use this code Here's a code snipit to set expiration time to 10 min: PHP Code: Tried this but doesn't work eather PHP Code: |
Are you checking your returned error ? maybe your Broker doesn't allow you to set an expiration time or the time you are trying to set is too short ? You must check the errors you get back when trying to place an order . . . |
ehh no i don't think so. How can i show that code? Is it something like return(); and then use the "comment" code to show it on the screen? My ordersend looks like this : int ticket = OrderSend(Symbol(),OP_BUYLIMIT,1.0,Bid-100*point,0,0,0,"My Expert",16384,expiration,Blue); |
if (OrderSend(Symbol(),OP_BUYLIMIT,1.0,Bid-100*point,0,0,0,"My Expert",16384,expiration,Blue) < 0) Comment("OrderSend failed: error ", GetLastError()); |
Ok it says: OrderSend failed error: 3 |
I'm using FXDD, do you know what code 3 means or do i have to ask the broker? |
Try a longer period, maybe 24hrs |
MQL4 Reference - Standard constants - Error codes |
Ok thanks for the information! |
Problem solved! Thanks for your help RaptorUK. |
© Forex Factory