[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 334 1...327328329330331332333334335336337338339340341...537 New comment Mario 2011.04.14 14:17 #3331 This is a thread to help people, not to sell an elephant) no ideas other than iHighest? gisip 2011.04.14 14:35 #3332 maryan.dirtyn: This is a forum to help people, not to sell an elephant) no ideas apart from iHighest ? https://docs.mql4.com/ru/series/iHigh https://docs.mql4.com/ru/series/iBarShift Mario 2011.04.14 14:47 #3333 gisip: https://docs.mql4.com/ru/series/iHigh https://docs.mql4.com/ru/series/iBarShift Thanks ... but I need it without the timeframe... Anyway, thanks for your help... I won't post here again Ctmcn 2011.04.14 15:23 #3334 There is silence in response... Any tips on where to dig: https: //www.mql5.com/ru/forum/131277/page328 gisip 2011.04.14 15:38 #3335 Ctmcn: There is silence in response... Any tips on where to dig: https: //www.mql5.com/ru/forum/131277/page328 Maybe you forgot to use OrderSend , so quote: "Question: Why aren't orders opening, where is the error? Please advise!"? Ctmcn 2011.04.14 17:28 #3336 gisip: Maybe you forgot to use OrderSend so quote: "Question: Why is there no opening of orders, where is the error ? Please, tell me!"? There is no such function in the "simple Expert Advisor" source code. I do not know where to write it in my version: //--------------------------------------------------------------- 4 -- // Учёт ордеров Symb=Symbol(); // Название фин.инстр. Total=0; // Количество ордеров for(int i=1; i<=OrdersTotal(); i++) // Цикл перебора ордер { if (OrderSelect(i-1,SELECT_BY_POS)==true) // Если есть следующий { // Анализ ордеров: if (OrderSymbol()!=Symb)continue; // Не наш фин. инструм if (OrderType()>1) // Попался отложенный { Alert("Обнаружен отложенный ордер. Эксперт не работает."); return; // Выход из start() } Total++; // Счётчик рыночн. орд if (Total>1) // Не более одного орд { Alert("Несколько рыночных ордеров. Эксперт не работает."); return; // Выход из start() } Ticket=OrderTicket(); // Номер выбранн. орд. Tip =OrderType(); // Тип выбранного орд. Price =OrderOpenPrice(); // Цена выбранн. орд. SL =OrderStopLoss(); // SL выбранного орд. TP =OrderTakeProfit(); // TP выбранного орд. Lot =OrderLots(); // Количество лотов } } //--------------------------------------------------------------- 5 -- // Торговые критерии int A= ADXbars; int B= CountBars; //-------------------------------------------------------------- 5a -- double b4plusdi=iCustom(NULL,0,"ADX Crossing",A,B); double nowplusdi=iCustom(NULL,0,"ADX Crossing",A,B); double b4minusdi=iCustom(NULL,0,"ADX Crossing",A,B); double nowminusdi=iCustom(NULL,0,"ADX Crossing",A,B); //-------------------------------------------------------------- 5b -- if (b4plusdi>b4minusdi && nowplusdi<nowminusdi) { Opn_B=true; // Критерий откр. Buy Cls_S=true; // Критерий закр. Sell } if (b4plusdi<b4minusdi && nowplusdi>nowminusdi) { Opn_S=true; // Критерий откр. Sell Cls_B=true; // Критерий закр. Buy } //--------------------------------------------------------------- 6 -- // Закрытие ордеров while(true) // Цикл закрытия орд. { if (Tip==0 && Cls_B==true) // Открыт ордер Buy.. { //и есть критерий закр Alert("Попытка закрыть Buy ",Ticket,". Ожидание ответа.."); RefreshRates(); // Обновление данных Ans=OrderClose(Ticket,Lot,Bid,2); // Закрытие Buy if (Ans==true) // Получилось :) { Alert ("Закрыт ордер Buy ",Ticket); break; // Выход из цикла закр } if (Fun_Error(GetLastError())==1) // Обработка ошибок continue; // Повторная попытка return; // Выход из start() } if (Tip==1 && Cls_S==true) // Открыт ордер Sell.. { // и есть критерий закр Alert("Попытка закрыть Sell ",Ticket,". Ожидание ответа.."); RefreshRates(); // Обновление данных Ans=OrderClose(Ticket,Lot,Ask,2); // Закрытие Sell if (Ans==true) // Получилось :) { Alert ("Закрыт ордер Sell ",Ticket); break; // Выход из цикла закр } if (Fun_Error(GetLastError())==1) // Обработка ошибок continue; // Повторная попытка return; // Выход из start() } break; // Выход из while } //--------------------------------------------------------------- 7 -- // Стоимость ордеров RefreshRates(); // Обновление данных Min_Lot=MarketInfo(Symb,MODE_MINLOT); // Миним. колич. лотов Free =AccountFreeMargin(); // Свободн средства One_Lot=MarketInfo(Symb,MODE_MARGINREQUIRED);// Стоимость 1 лота Step =MarketInfo(Symb,MODE_LOTSTEP); // Шаг изменен размера if (Lots > 0) // Если заданы лоты,то Lts =Lots; // с ними и работаем else // % свободных средств Lts=MathFloor(Free*Prots/One_Lot/Step)*Step;// Для открытия if(Lts < Min_Lot) Lts=Min_Lot; // Не меньше минимальн if (Lts*One_Lot > Free) // Лот дороже свободн. { Alert(" Не хватает денег на ", Lts," лотов"); return; // Выход из start() } //--------------------------------------------------------------- 8 -- // Открытие ордеров while(true) // Цикл закрытия орд. { if (Total==0 && Opn_B==true) // Открытых орд. нет + { // критерий откр. Buy RefreshRates(); // Обновление данных SL=Bid - New_Stop(StopLoss)*Point; // Вычисление SL откр. TP=Bid + New_Stop(TakeProfit)*Point; // Вычисление TP откр. Alert("Попытка открыть Buy. Ожидание ответа.."); Ticket=OrderSend(Symb,OP_BUY,Lts,Ask,2,SL,TP);//Открытие Buy if (Ticket > 0) // Получилось :) { Alert ("Открыт ордер Buy ",Ticket); return; // Выход из start() } if (Fun_Error(GetLastError())==1) // Обработка ошибок continue; // Повторная попытка return; // Выход из start() } if (Total==0 && Opn_S==true) // Открытых орд. нет + { // критерий откр. Sell RefreshRates(); // Обновление данных SL=Ask + New_Stop(StopLoss)*Point; // Вычисление SL откр. TP=Ask - New_Stop(TakeProfit)*Point; // Вычисление TP откр. Alert("Попытка открыть Sell. Ожидание ответа.."); Ticket=OrderSend(Symb,OP_SELL,Lts,Bid,2,SL,TP);//Открытие Sel if (Ticket > 0) // Получилось :) { Alert ("Открыт ордер Sell ",Ticket); return; // Выход из start() } if (Fun_Error(GetLastError())==1) // Обработка ошибок continue; // Повторная попытка return; // Выход из start() } break; // Выход из while } //--------------------------------------------------------------- 9 -- return; // Выход из start() } //-------------------------------------------------------------- 10 -- P.S. There is only in the order opening block (8). [Deleted] 2011.04.14 21:04 #3337 This is some kind of nonsense. I can't attach the Zig-Zag to the graphic. Can anyone tell me what the problem is? --- 2011.04.14 21:29 #3338 346206: This is some kind of nonsense. I can't attach the Zig-Zag to the graphic. Can anyone tell me what the problem is? Maybe it is not in MT4 that you are trying? Сергей 2011.04.15 05:25 #3339 Good day dear forum users, I haven't been here for a long time. I looked this year there will be another EA championship, I decided to take part in it. Can anyone suggest a tutorial on MT5 as an example? I myself tried to get the hang of it but I can't see any further MT4 (. FOREX - Trends, Forecasts Can anyone help? MoonKing System (MKS) --- 2011.04.15 07:40 #3340 sergindo: Good day dear forum users, I haven't been here for a long time. I looked this year there will be another EA championship, I decided to take part in it. Can anyone suggest a tutorial on MT5 as an example? I myself tried to get the hang of it but I can't see any further MT4 (. MT5 can be downloaded here, there are many examples 1...327328329330331332333334335336337338339340341...537 New comment
This is a forum to help people, not to sell an elephant) no ideas apart from iHighest ?
https://docs.mql4.com/ru/series/iHigh
https://docs.mql4.com/ru/series/iBarShift
https://docs.mql4.com/ru/series/iHigh
https://docs.mql4.com/ru/series/iBarShift
There is silence in response...
Any tips on where to dig: https: //www.mql5.com/ru/forum/131277/page328
There is silence in response...
Any tips on where to dig: https: //www.mql5.com/ru/forum/131277/page328
Maybe you forgot to use OrderSend so quote: "Question: Why is there no opening of orders, where is the error ? Please, tell me!"?
There is no such function in the "simple Expert Advisor" source code. I do not know where to write it in my version:
P.S. There is only in the order opening block (8).
This is some kind of nonsense. I can't attach the Zig-Zag to the graphic. Can anyone tell me what the problem is?
This is some kind of nonsense. I can't attach the Zig-Zag to the graphic. Can anyone tell me what the problem is?
Good day dear forum users, I haven't been here for a long time.
I looked this year there will be another EA championship, I decided to take part in it. Can anyone suggest a tutorial on MT5 as an example?
I myself tried to get the hang of it but I can't see any further MT4 (.
Good day dear forum users, I haven't been here for a long time.
I looked this year there will be another EA championship, I decided to take part in it. Can anyone suggest a tutorial on MT5 as an example?
I myself tried to get the hang of it but I can't see any further MT4 (.