use OrderModify()
RefreshRates() before OrderSeend()
scheggia97:
See here -> https://www.mql5.com/en/forum/126073. U don't necessarily need to use RefreshRates() before OrderSend().
[...]
RefreshRates() - Where I should put this ?
Thanks qjol and gordon, I must study a solution.
If you may have any other idea please tell me.
Greeting from Italy,
Scheggia97
double Lots = 0.01; int SL = 430; int TP = 1000; int Magic = 12345; int ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, 0, 0, "", Magic, 0, Blue); if (ticket == -1) { Print("OrderSend() error - ", GetLastError()); } if (ticket > -1) { OrderSelect(ticket, SELECT_BY_TICKET); bool retrn = OrderModify(OrderTicket(), OrderOpenPrice(), Ask - SL*Point, Ask + TP*Point, 0, Blue); if (retrn == false) { Print("OrderModify() error - ", GetLastError()); } }
gordon:
See here -> https://www.mql5.com/en/forum/126073. U don't necessarily need to use RefreshRates() before OrderSend().
See here -> https://www.mql5.com/en/forum/126073. U don't necessarily need to use RefreshRates() before OrderSend().
From what it seems (OrderSend("EURGBP")), he uses the EA on a chart of a different currency, Therefore, there is a reason to use RefreshRates()
qjol:
From what it seems (OrderSend("EURGBP")), he uses the EA on a chart of a different currency, Therefore, there is reason to use RefreshRates()
From what it seems (OrderSend("EURGBP")), he uses the EA on a chart of a different currency, Therefore, there is reason to use RefreshRates()
No. In his example he is using MarketInfo() to read Bid, Ask and Point values. RefreshRates() is only needed when using any of the predefined variables (and he isn't). MarketInfo() does not require RefreshRates().
gordon:
No. In his example he is using MarketInfo() to read Bid, Ask and Point values. RefreshRates() is only needed when using any of the predefined variables (and he isn't).
then y not to use Bid Ask
qjol:
then y not to use Bid Ask
You gave the answer to that yourself. He is trading on another symbol than the one the expert is attached to (or it seems that he is).
then y not to use Bid Ask

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 sending the first order on my live account, but it doesn't work. Can anybody tell me what's wrong ?
It is ok in demo but no on live. I use the below code, Thanks, Scheggia97 from Italy
OrderSend("EURGBP",OP_BUY,0.01,MarketInfo("EURGBP",MODE_ASK),3,0,MarketInfo("EURGBP",MODE_BID)+430*MarketInfo("EURGBP",MODE_POINT) );