Try this perhaps ?. The comment should be string and the newask should be Ask
ticket=OrderSend(pair,OP_BUY,LOT1, Ask, 30*point,0,0,"0",0,0,Green);
zaffrono:
I am testing my Slave EA on IBFX Australia ( US Currency ) and have the following problem:
For Buy Trade I am using the following command:
I have tested the EA on other brokers and it has worked smoothly.
Could someone tell me what would be the best solution for IBFX.
TIA
Test the return value from the OrderSend, if it's -1 report the error . . . then you will have an idea of why it failed. I suspect that the issue is that you are trying to buy at a price other than Ask . . . and you can't do that with a market order.
I am testing my Slave EA on IBFX Australia ( US Currency ) and have the following problem:
For Buy Trade I am using the following command:
I have tested the EA on other brokers and it has worked smoothly.
Could someone tell me what would be the best solution for IBFX.
TIA
onewithzachy:
Try this perhaps ?. The comment should be string and the newask should be Ask
Thank you for your prompt respond. I have already tried it and no use.
No need to ask other people, just ask your code to tell you like so:
ticket=OrderSend(pair,OP_BUY,LOT1,newask,30*point,0,0,0,0,0,Green); if (ticket<=0) Print("+OrderSendErr=",GetLastError()," tic=",ticket); else myOrderModify(ticket,OrderOpenPrice(),sl,tp,0,oColour);
The "else" is when your OrderSend works, which means you need to adjust the TP and SL - unless you intentionally don't want to.
zaffrono:
Thank you for your prompt respond. I have already tried it and no use.
You can't set Slippage at 30*point if you want 30 points use 30 check the documentation, OrderSend() . . . Slippage is an int that should give you a clue.
Thank you for your prompt respond. I have already tried it and no use.
RaptorUK:
You can't set Slippage at 30*point if you want 30 points use 30 check the documentation, OrderSend() . . . Slippage is an int that should give you a clue.
What do you mean? Note it's point, not Point, which may or may not be the same thing.
You can't set Slippage at 30*point if you want 30 points use 30 check the documentation, OrderSend() . . . Slippage is an int that should give you a clue.
blogzr3:
What do you mean? Note it's point, not Point.
OK, we can't see what point is . . . but I suspect it is a double and is related to pip . . . but my suspicion might be wrong.
What do you mean? Note it's point, not Point.
RaptorUK:
OK, we can't see what point is . . . but I suspect it is a double and is related to pip . . . but my suspicion might be wrong.
The "sometime works, and sometimes don't" would tend to rule that out.
OK, we can't see what point is . . . but I suspect it is a double and is related to pip . . . but my suspicion might be wrong.
blogzr3:
The "sometime works, and sometimes don't" would tend to rule that out.
Why ? will setting slippage at 30 Points cause OrderSend to fail sometimes but not always ? won't it just be typecast to 0 ?
The "sometime works, and sometimes don't" would tend to rule that out.
I'm talking about having a double in there when an int is required, is very unlikely to work under any circumstances.
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
For Buy Trade I am using the following command:
Please note that the value of the open price is determined by the Master EA. Therefor, whenever the ask price is less or equal to open price, my Slave EA must execute a buy trade. However, IBFX sometimes execute and opens a buy trade and sometime not.I have tested the EA on other brokers and it has worked smoothly.
Could someone tell me what would be the best solution for IBFX.
TIA