liquidd:
here is where I have problems.I want to take a pending order and I have a hard time setting it up I have try many things but none works so far I always have error 130 even tough I have way out of the minimum range takeprofit and stoploss.
ticket3 = OrderSend("EURUSD", OP_BUYSTOP, lot, Ask+450*Point, 30, 0, 0, "", Magic, 0);You are specifying EURUSD instead of the usual Symbol(). 1) if you are not on the EURUSD chart then Ask is invalid price. 2) the actual symbol may not be exactly EURUSD (some brokers use EURUSDm for micro accounts etc.)
ticket3 = OrderSend("EURUSD", OP_BUYSTOP, lot, Ask+450*Point, 30, 0, 0, "", Magic, 0); OrderSelect(ticket3,SELECT_BY_TICKET); { tp3 = OrderTakeProfit();If the orderSelect fails the OrderTakeProfit, etc is meaningless. Always check return codes
ticket3 = OrderSend("EURUSD", OP_BUYSTOP, lot, Ask+450*Point, 30, 0, 0, "", Magic, 0); if (ticket3 < 0){ Alert(GetLastError()); ... } else if (OrderSelect(ticket3,SELECT_BY_TICKET)){ tp3 = OrderTakeProfit();
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
here is where I have problems.I want to take a pending order and I have a hard time setting it up I have try many things but none works so far I always have error 130 even tough I have way out of the minimum range takeprofit and stoploss.I don,t know how to set this up properly maybe someone is willing to help me out
here is the code I have errors with these are the most likely to me try that I have made so far