[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 381 1...374375376377378379380381382383384385386387388...632 New comment Виктор 2012.09.12 07:50 #3801 Hi! Can you tell me how to modify all orders of the same type? Paladin80 2012.09.12 09:20 #3802 Skif_7: Hi, could you tell me how to modify all orders of the same type?OrderModify(). From the list of orders we have to select the corresponding orders one by one and modify them. Lowech 2012.09.12 10:15 #3803 (Anyone know how to find the last closed order!)) --- 2012.09.12 10:43 #3804 lowech: (Anyone know how to find the last closed order!)) int FindOrder(int SysID, string smb, double &prop) // возвращает тикет ордера { int ticket=0, total=OrdersHisoryTotal(); if (total<=0) return(0); prop=0; // property which needed for(int i=0; i<total; i++) { if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) return(-1); if (OrderMagicNumber()!=SysID || (OrderSymbol()!=smb&&smb!="")) continue; if (prop<OrderCloseTime() || ticket<=0) { prop=OrderCloseTime(); ticket=OrderTicket(); } } return(ticket); } BBC 2012.09.12 10:52 #3805 lowech: (someone knows how to find the last closed order!))Or so it seems: datetime LastCloseTime() { datetime CloseTime; for(int i=OrdersTotal()-1; i>=0; i--){ if(!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))continue; if(OrderSymbol()!=Symbol())continue; if(OrderMagicNumber()!=Magic) continue; if(OrderType()>1)continue; if(CloseTime<=OrderCloseTime())CloseTime=OrderCloseTime(); } return(CloseTime);} //======================================================================================================= Mikhail Ermakov 2012.09.12 21:45 #3806 Good day to you all. Can you tell me if it is possible to create a loop to search variables and assign a value to them For example: I need to search 20 variables C1, C2, C3, etc. and in the course of the search assign them values. If it is possible tell me how? Regards Gek. [ARCHIVE] Any rookie question, Any questions from newcomers Expert Advisors: EQUILIBRIUM-2011 Vadim Zhunko 2012.09.13 00:27 #3807 Gek34: Good day to you all. Can you tell me if it is possible to create a loop to search variables and assign a value to them For example: I need to search 20 variables C1, C2, C3, etc., and in the course of the search assign them values. If it is possible tell me how? Regards Gek. int i = 0; int anAr[20] = {0}; for (i = 0; i < 20; i++) { anAr[i] = i; // Присваиваем. Print(anAr[i]); // Выводим. } for (i = 0; i < 20; i++) { Print(anAr[i]); // Выводим. anAr[i] = 20 - i; // Присваиваем. Print(anAr[i]); // Выводим. } Swat 2012.09.13 05:44 #3808 Please advise how to install MT4/MT5 if access to the internet is via proxy with password, but MT does not ask for proxy when installing Mikhail Ermakov 2012.09.13 07:04 #3809 Zhunko: Thank you very much, I understand the principle. Maxim Kyzminsky 2012.09.13 07:38 #3810 People, which of the standard indicators can be used to identify a flat? or more precisely which is the best of the standard ones... :) 1...374375376377378379380381382383384385386387388...632 New comment
Hi, could you tell me how to modify all orders of the same type?
(Anyone know how to find the last closed order!))
(someone knows how to find the last closed order!))
Or so it seems:
Good day to you all.
Can you tell me if it is possible to create a loop to search variables and assign a value to them For example:
I need to search 20 variables C1, C2, C3, etc. and in the course of the search assign them values.
If it is possible tell me how?
Regards Gek.
Good day to you all.
Can you tell me if it is possible to create a loop to search variables and assign a value to them For example:
I need to search 20 variables C1, C2, C3, etc., and in the course of the search assign them values.
If it is possible tell me how?
Regards Gek.
Thank you very much, I understand the principle.
People, which of the standard indicators can be used to identify a flat?
or more precisely which is the best of the standard ones... :)