Can someone advise:What to do if trades are automatically copied not with the volume of the lot, which is positioned by the trader, but with larger volumes????
Try reading about trading signals or search the forum. https://www.mql5.com/ru/articles/523. Maybe, the deal volume is calculated as a percentage of the deposit and your deposit is higher than the deposit of the trader to whose signal you are subscribed.
"Сигналы" - это социальный трейдинг c MetaTrader 4 и MetaTrader 5. Сервис напрямую интегрирован в торговые платформы, и позволяет любому легко копировать торговые операции профессиональных трейдеров. Из тысяч провайдеров выберите понравившегося, подпишитесь в несколько кликов, и сделки моментально начнут копироваться на ваш счет.
All right. No one's talking. Let me get this straight. Renat let it slip that MQ vps have lightweight terminals. They're supposed to be fast because of that. Well, where do I get one?
Vitalii Ananev: There is no special one. You need to find the last closed position in the trading history. And then see if it closed with a loss or not.
Please tell me how to write in the code (if an order is closed in deficit, then the next one will be increased). There is no SL or TP.
Maybe there is a special function for this?
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 19.02.2008 |//| Описание : Возвращает флаг убыточности последней позиции. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента ("" - любой символ, |//| NULL - текущий символ) |//| op - операция (-1 - любая позиция) |//| mn - MagicNumber (-1 - любой магик) |//+----------------------------------------------------------------------------+bool isLossLastPos(string sy="", int op=-1, int mn=-1) {
datetime t;
int i, j=-1, k=OrdersHistoryTotal();
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
if (OrderSymbol()==sy || sy=="") {
if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
if (op<0 || OrderType()==op) {
if (mn<0 || OrderMagicNumber()==mn) {
if (t<OrderCloseTime()) {
t=OrderCloseTime();
j=i;
}
}
}
}
}
}
}
if (OrderSelect(j, SELECT_BY_POS, MODE_HISTORY)) {
if (OrderProfit()<0) return(True);
}
return(False);
}
What to put in the external settings?
If you are referring to the settings of the levels to be optimised and changed by the user, you already have them in place.
I've got it.
Thank you.
Can someone advise:What to do if trades are not automatically copied with the lot volume that the trader has positioned, but with larger volumes????
Can someone advise:What to do if trades are automatically copied not with the volume of the lot, which is positioned by the trader, but with larger volumes????
Try reading about trading signals or search the forum. https://www.mql5.com/ru/articles/523. Maybe, the deal volume is calculated as a percentage of the deposit and your deposit is higher than the deposit of the trader to whose signal you are subscribed.
Please tell me how to write in the code (if an order is closed in deficit, then the next one will be increased). There is no SL or TP.
Maybe there is a special function for this?
Please tell me how to write in the code (if an order is closed in deficit, then the next one will be increased). There is no SL or TP.
Maybe there is a special function for this?
And tell me where to get a lightweight terminal?
All right. No one's talking. Let me get this straight. Renat let it slip that MQ vps have lightweight terminals. They're supposed to be fast because of that. Well, where do I get one?
There is no special one. You need to find the last closed position in the trading history. And then see if it closed with a loss or not.
Please tell me how to write in the code (if an order is closed in deficit, then the next one will be increased). There is no SL or TP.
Maybe there is a special function for this?
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
comp, 2016.03.31 07:39
Help solve an ambush. I'm rewriting from MT4 to MT5, everything is working out slowly, but I can't find the analogue of four-wayIndicatorBuffers.
I've learned that there is no analogue in article Moving from MQL4 to MQL5. What the hell is this?
Article:How to write an indicator in MQL5.
Documentation:Program Properties (#property).
indicator_buffers
int
Number of buffers for an indicator calculation
indicator_plots
int
Numberof graphic series in the indicator