My first order, need help
use OrderModify()
RefreshRates() before OrderSeend()
[...]
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()); } }
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()
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().
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
then y not to use Bid Ask
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) );