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
The OrderSend+Sleep(0) option is not slower than OrderSend+OnTradeTransaction. I've measured it. Therefore, I don't use the second variant not for asynchronous transactions.
The OrderSend+Sleep(0) variant is temporary, because it's a shortcoming of developers (don't use it as an example :) ).
When it's fixed, only OrderSend will be left
Is that your decision or an insider's view?
I'm embarrassed to ask, does "OrderSend+Sleep(0)" !
Yes, there is no equality.
Forum on trading, automated trading systems and trading strategy testing
Libraries: MT4Orders
fxsaber, 2016.11.14 13:33
// Add: Полная синхронизация OrderSend, OrderModify, OrderClose, OrderDelete с торговым окружением (реал-тайм и история) - как в MT4.
// Максимальное время синхронизации можно задать через MT4ORDERS::OrderSend_MaxPause в мкс. Среднее время синхронизации в MT5 ~1 мс.
The OrderSend+Sleep(0) variant is temporary, because it's a shortcoming of developers (don't bring it as an example :) ).
When corrected, only OrderSend will be left
Not corrected, because it's not a bug, but a feature.
Forum on Trading, Automated Trading Systems & Strategy Testing
How to work correctly in MT5 with OrderSend
fxsaber, 2016.11.15 13:30
Try writing the following function in your EA
Forum on trading, automated trading systems and strategy testing
How to work correctly in MT5 with OrderSend
fxsaber, 2016.11.15 14:14
Someone implements it immediately
#property strict
#include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006
void Func( const string &Symbols[] )
{
const int Total = ArraySize(Symbols);
for (int i = 0; i < Total; i++)
{
const double Price = SymbolInfoDouble(Symbols[i], SYMBOL_ASK);
const int digits = (int)SymbolInfoInteger(Symbols[i], SYMBOL_DIGITS);
if (!OrderSelect(OrderSend(Symbols[i], OP_BUY, 1, Price, 100, 0, 0, DoubleToString(Price, digits)), SELECT_BY_TICKET) ||
(NormalizeDouble(Price - OrderOpenPrice(), digits) != 0)) // если не получилось открыть или есть проскальзывание - выходим
break;
}
}
void OnStart() // OnTick
{
const string Symbols[] = {"EURUSD", "GBPUSD", "AUDUSD", "USDCAD", "USDJPY"};
Func(Symbols);
}
And someone is waiting for mana from the developers.
Can you tell me how to set a stop and a take?
here's a script to help you.https://www.mql5.com/ru/code/17994