L
Some ideas:-
Symbol must be a string
The prices should be all to 4 decimal places (or 5 if that is what the broker is using)
If this is a standard account, the minimum lot may be 1.0
OrderSend("EURUSD", OP_BUYSTOP, 0.1, 1.5630, 5, 1.5615, 1.5660,"My order",0, 82800, Green);
NB - not all brokers accept expirations
Good Luck
-BB-
Thank you.
The problem is with the expiration number. I thought it should be the number of seconds after the order has been placed, but as sxTed pointed out, the function is expecting a datetime value.
I start using:
datetime t=TimeCurrent(); t=t-TimeHour(t)*60*60-TimeMinute(t)*60-TimeSeconds(t)+23*60*60;Seems to be ok.
Thank you guys.
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
I am trying to place a BuyStop order but I am getting ordersend error 3 (ERR_INVALID_TRADE_PARAMETERS)
I have checked the parameters that I am sending but still can't find the error, could someone help me please?
Symbol EURUSD
Lots 0.1
Slippage 5 points
Price 1.5630
SL 1.5615
TP 1.5660
Expiration 23 hours = 23*60*60 seconds.
The current ask price is 1.5565
Thank you for your help.