Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Я немного добавил кода:
//+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { AllowTrade=true; ClosePositions=false; flag=true; LastTrade=CurTime(); PrevTime=Time[0]; CountBars=0; Print("Выполнен блок init"); return(0); }и здесь
//+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { if ((Year()<2005) || (Month()<6)) return (0); Print("AllowTrade=",AllowTrade," ClosePositions=",ClosePositions," CountBars=",CountBars," CurTime()=",CurTime()," LastTrade=",LastTrade); bool OpenSell=false,OpenBuy=false,NewBar=false;Тестер не открывает ни одной позиции после первого прогона, открываем лог:
18:05:32 ClosePositions inputs: Lots=0.1; TakeProfit=500; StopLoss=500;
18:05:32 ClosePositions EURUSD,H4: Выполнен блок init
18:05:33 2005.06.01 00:00 ClosePositions EURUSD,H4: AllowTrade=1 ClosePositions=0 CountBars=0 CurTime()=1117584000 LastTrade=1134403199
18:05:33 2005.06.01 04:00 ClosePositions EURUSD,H4: AllowTrade=1 ClosePositions=0 CountBars=1 CurTime()=1117598400 LastTrade=1134403199
18:05:33 2005.06.01 08:00 ClosePositions EURUSD,H4: AllowTrade=1 ClosePositions=0 CountBars=2 CurTime()=1117612800 LastTrade=1134403199
18:05:33 2005.06.01 12:00 ClosePositions EURUSD,H4: AllowTrade=1 ClosePositions=0 CountBars=3 CurTime()=1117627200 LastTrade=1134403199
18:05:33 2005.06.01 16:00 ClosePositions EURUSD,H4: AllowTrade=1 ClosePositions=0 CountBars=4 CurTime()=1117641600 LastTrade=1134403199
//+------------------------------------------------------------------+ //| FastClosingOfAllPositions(SpecialForRosh).mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| график H4 | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" extern double Lots = 0.1; extern int TakeProfit = 500; extern int StopLoss = 500; static int magicNumber = 123456; bool AllowTrade;/*Переменная AllowTrade при старте советника, устанавливается в true,тем самым разрешает программе открывать ордера один раз в начале работы. Как только счетчик баров сосчитает до десяти AllowTrade устанавливается в false, раз и навсегда, и больше ордера не открываются, т.к. изначально стоит цель стоит не открывать ордера, а быстро и без ошибок их закрыть. А если мы будем открывать, закрывать, потом опять открывать ордера, то трудно будет проконтролировать весь процесс. Переменная AllowTrade принимает значение true в функции init(), которая срабатывает только при запуске МТ4 или когда ты присоеденяешь советника к графику. Как сделать, чтобы AllowTrade устанавливалась в true каждый раз когда ты жмешь кнопку "стоп", а потом кнопку "старт", я не знаю, поэтому, чтобы программа работала нужно каждый раз либо убирать советника с графика, а потом опять ставить, либо перезапускать МТ4, что проще.*/ bool ClosePositions;/*Разрешает советнику закрывать все ордера, изначально установлена в false. Как только счетчик сосчитает до 10, сначала AllowTrade устанавливается в false и открытие ордеров прекращается, потом ClosePositions устанавливается в true и разрешается их закрытие.*/ bool flag;/* В зависимости от его состояния, открываются или ордера Buy и SellStop, или ордера Sell и BuyStop*/ datetime PrevTime;/* Нужна для работы счетчика баров. В нее записывается время открытия последнего бара */ int CountBars;/* Сообственно, сам счетчик баров, с каждым новым баром его значение увеличивается на единицу */ /* LastTrade я убрал, т.к. она не обязательна. */ //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { AllowTrade=true; ClosePositions=false; flag=true; PrevTime=Time[0]; CountBars=0; Print("Выполнен блок init"); return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { /* if((Year<2005) || (Month<6)) return(0); - Разрешает программе работать только с 1 июня 2005 года. Это я вообще убрал, чтобы глаза не мозолила. */ //Print("AllowTrade=",AllowTrade," ClosePositions=",ClosePositions, //" CountBars=",CountBars," CurTime()=",CurTime()); // Локальные переменные bool OpenSell=false;/* Дает непосредственный сигнал на открытие ордеров Sell и BuyStop и, если AllowTrade=true ордера открываются */ bool OpenBuy=false;/* Дает непосредственный сигнал на открытие ордеров Buy и SellStop и, если AllowTrade=true ордера открываются */ bool NewBar=false;/* Принимает значение true только в начале каждого нового бара, используется вместе с flag в генраторе торговых сигналов, таким образом сигналы OpenSell или OpenBuy (взависимости от значения пременной flag) появляются только в начале каждого нового бара */ int ticket=0;/* Используется при открытии ордеров, функция OrderSend() возвращает в неё своё значение */ //+------------------------------------------------------------------------------------------------+ //| Модуль счетчика баров //+------------------------------------------------------------------------------------------------+ //Отфильтрововаем бары от ценовых тиков if (Time[0]>PrevTime) { CountBars++; NewBar=True; PrevTime=Time[0]; } //+------------------------------------------------------------------------------------------------+ //| Конец модуля счетчика баров //+------------------------------------------------------------------------------------------------+ //+------------------------------------------------------------------------------------------------+ //| Генератор торговых сигналов. Открытие ордеров в начале каждого нового бара //+------------------------------------------------------------------------------------------------+ if (NewBar) { if (flag) { OpenBuy=true;flag=false; } else { OpenSell=true;flag=true; } } //+------------------------------------------------------------------------------------------------+ //| Конец генератора торговых сигналов //+------------------------------------------------------------------------------------------------+ //+------------------------------------------------------------------------------------------------+ //| Если счетчик сосчитал до десяти... //+------------------------------------------------------------------------------------------------+ if (CountBars>10) { AllowTrade=false;/* прекращаем открытие новых ордеров... */ Sleep(1000);/* dыдержка в 1 секунду, так на всякий случай... */ ClosePositions=true;/* и даём команду на закрытие всех открытых ордеров. */ } //+------------------------------------------------------------------------------------------------+ //| //+------------------------------------------------------------------------------------------------+ //+------------------------------------------------------------------------------------------------+ //| Открытие ордеров //+------------------------------------------------------------------------------------------------+ if (OpenSell && AllowTrade) /* если есть сигнал на открытие Sell и BuyStop... */ { ticket=0; /* Откроем отложенный ордер... */ while (ticket==0) /* Запускаем цикл с интервалом в 1 секунду, пока функция OrderSend() не вернет нам значение отличное от нуля */ { RefreshRates();/* Обновляем данные во встроенных переменных и массивах-таймсериях */ ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,1.4,3,1.4-StopLoss*Point,1.4+TakeProfit*Point, "OP_BUYSTOP",magicNumber,0,Pink); /* Выбераем цену, чтобы ордер никогда не сработал... */ Sleep(1000); } Sleep(10000); /* Выдержка между торговыми операциями... */ ticket=0; /* Откроем основной ордер... */ while (ticket==0) /* Запускаем цикл с интервалом в 1 секунду, пока функция OrderSend() не вернет нам значение отличное от нуля */ { RefreshRates();/* Обновляем данные во встроенных переменных и массивах-таймсериях */ ticket=OrderSend(Symbol(),OP_SELL,Lots,NormalizeDouble(Bid,Digits),3, NormalizeDouble(Bid,Digits)+StopLoss*Point,NormalizeDouble(Bid,Digits)-TakeProfit*Point, "OP_SELL",magicNumber,0,Blue); Sleep(1000); } OpenSell=false; /* Обнуляем сигнал OpenSell */ } if (OpenBuy && AllowTrade) /* если есть сигнал на открытие Buy и SellStop... */ { ticket=0; // Откроем отложенный ордер. while (ticket==0) /* Запускаем цикл с интервалом в 1 секунду, пока функция OrderSend() не вернет нам значение отличное от нуля */ { RefreshRates();/* Обновляем данные во встроенных переменных и массивах-таймсериях */ ticket=OrderSend(Symbol(), OP_SELLSTOP, Lots,1.1,3,1.1+StopLoss*Point, 1.1-TakeProfit*Point, "OP_SELLSTOP", magicNumber, 0, SkyBlue); /* Выбераем цену, чтобы ордер никогда не сработал... */ Sleep(1000); } Sleep(10000); /* Выдержка между торговыми операциями... */ ticket=0; // Откроем основной ордер. while (ticket==0) /* Запускаем цикл с интервалом в 1 секунду, пока функция OrderSend() не вернет нам значение отличное от нуля */ { RefreshRates();/* Обновляем данные во встроенных переменных и массивах-таймсериях */ ticket=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,Digits),3, NormalizeDouble(Ask,Digits)-StopLoss*Point,NormalizeDouble(Ask,Digits)+TakeProfit*Point, "OP_BUY",magicNumber,0,Yellow); Sleep(1000); } OpenBuy=false; /* Обнуляем сигнал OpenBuy */ } //+------------------------------------------------------------------------------------------------+ //| Конец открытия ордеров //+------------------------------------------------------------------------------------------------+ //+------------------------------------------------------------------------------------------------+ //| А теперь самое главное, модуль закрытия всех открытых ордеров... //+------------------------------------------------------------------------------------------------+ /* Здесь я не буду изобретать велосипед, тем более, что конструктор из меня хреновый... Возмем два способа закрытия позиций: от Matias Romeo и от KimIV. */ // Способ 1 от Matias Romeo: /* if(ClosePositions) {//1 int total=OrdersTotal(); for(int i=total-1;i>=0;i--) {//2 OrderSelect(i,SELECT_BY_POS); int type=OrderType(); bool result=false; switch(type) {//3 case OP_BUY: result=OrderClose(OrderTicket(),OrderLots(), MarketInfo(OrderSymbol(),MODE_BID),5,Yellow);break; case OP_SELL: result=OrderClose(OrderTicket(),OrderLots(), MarketInfo(OrderSymbol(),MODE_ASK),5,Plum);break; case OP_BUYLIMIT: result=OrderDelete(OrderTicket()); case OP_SELLLIMIT: result=OrderDelete(OrderTicket()); case OP_BUYSTOP: result=OrderDelete(OrderTicket()); case OP_SELLSTOP: result=OrderDelete(OrderTicket()); }//3 if(result) {//4 Sleep(10000); }//4 else {//5 Alert("Ордер типа ",OrderType()," № ",OrderTicket()," не удалось закрыть. Ошибка: " ,GetLastError()); Sleep(3000); }//5 }//2 }//1 */ // Способ 1 от KimIV: if(ClosePositions) {//1 bool fc; int err,it,NumberTry=3; for(int i=OrdersTotal()-1;i>=0;i--) {//2 if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) {//3 if ((OrderSymbol()==Symbol())&&(OrderMagicNumber()==magicNumber)) {//4 fc=false; for(it=0;it<NumberTry;it++) {//5 while(!IsTradeAllowed()) Sleep(5000); RefreshRates();/* Обновляем данные во встроенных переменных и массивах-таймсериях */ if(OrderType()==OP_BUY) {//6 fc=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,Digits),5,Yellow); if(fc) break; else {//7 err=GetLastError(); Alert(" Ошибка (",err,") закрытия ордера BUY, попытка №",it+1); }//7 }//6 if(OrderType()==OP_SELL) {//8 fc=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Ask,Digits),5,Blue ); if(fc) break; else {//9 err=GetLastError(); Alert(" Ошибка (",err,") закрытия ордера SELL, попытка №",it+1); }//9 }//8 if(OrderType()==OP_BUYSTOP) {//10 fc=OrderDelete(OrderTicket()); if(fc) break; else {//11 err=GetLastError(); Alert(" Ошибка (",err,") закрытия ордера BUYSTOP, попытка №",it+1); }//11 }//10 if(OrderType()==OP_SELLSTOP) {//12 fc=OrderDelete(OrderTicket()); if(fc) break; else {//13 err=GetLastError(); Alert(" Ошибка (",err,") закрытия ордера SELLSTOP, попытка №",it+1); }//13 }//12 }//5 }//4 }//3 }//2 }//1 //+------------------------------------------------------------------------------------------------+ //| Можешь добавить свой способ закрытия... //+------------------------------------------------------------------------------------------------+ return(0); } //+------------------------------------------------------------------+Отчет по методу KimIV:
19:56:12 FastClosingOfAllPositions(SpecialForRosh): loaded successfully
19:56:12 FastClosingOfAllPositions(SpecialForRosh) inputs: Lots=0.1; TakeProfit=500; StopLoss=500;
19:56:12 FastClosingOfAllPositions(SpecialForRosh): Выполнен блок init
19:56:12 2005.03.01 20:00 FastClosingOfAllPositions(SpecialForRosh): open #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.01 20:00 FastClosingOfAllPositions(SpecialForRosh): open #2 buy 0.10 EURUSD at 1.3188 sl: 1.2688 tp: 1.3688 ok
19:56:12 2005.03.02 00:00 FastClosingOfAllPositions(SpecialForRosh): open #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.02 00:00 FastClosingOfAllPositions(SpecialForRosh): open #4 sell 0.10 EURUSD at 1.3183 sl: 1.3683 tp: 1.2683 ok
19:56:12 2005.03.02 04:00 FastClosingOfAllPositions(SpecialForRosh): open #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.02 04:00 FastClosingOfAllPositions(SpecialForRosh): open #6 buy 0.10 EURUSD at 1.3156 sl: 1.2656 tp: 1.3656 ok
19:56:12 2005.03.02 08:00 FastClosingOfAllPositions(SpecialForRosh): open #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.02 08:00 FastClosingOfAllPositions(SpecialForRosh): open #8 sell 0.10 EURUSD at 1.3168 sl: 1.3668 tp: 1.2668 ok
19:56:12 2005.03.02 12:00 FastClosingOfAllPositions(SpecialForRosh): open #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.02 12:00 FastClosingOfAllPositions(SpecialForRosh): open #10 buy 0.10 EURUSD at 1.3108 sl: 1.2608 tp: 1.3608 ok
19:56:12 2005.03.02 16:00 FastClosingOfAllPositions(SpecialForRosh): open #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.02 16:00 FastClosingOfAllPositions(SpecialForRosh): open #12 sell 0.10 EURUSD at 1.3097 sl: 1.3597 tp: 1.2597 ok
19:56:12 2005.03.02 20:00 FastClosingOfAllPositions(SpecialForRosh): open #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.02 20:00 FastClosingOfAllPositions(SpecialForRosh): open #14 buy 0.10 EURUSD at 1.3121 sl: 1.2621 tp: 1.3621 ok
19:56:12 2005.03.03 00:00 FastClosingOfAllPositions(SpecialForRosh): open #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 00:00 FastClosingOfAllPositions(SpecialForRosh): open #16 sell 0.10 EURUSD at 1.3135 sl: 1.3635 tp: 1.2635 ok
19:56:12 2005.03.03 04:00 FastClosingOfAllPositions(SpecialForRosh): open #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 04:00 FastClosingOfAllPositions(SpecialForRosh): open #18 buy 0.10 EURUSD at 1.3135 sl: 1.2635 tp: 1.3635 ok
19:56:12 2005.03.03 08:00 FastClosingOfAllPositions(SpecialForRosh): open #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 08:00 FastClosingOfAllPositions(SpecialForRosh): open #20 sell 0.10 EURUSD at 1.3128 sl: 1.3628 tp: 1.2628 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #20 sell 0.10 EURUSD at 1.3128 sl: 1.3628 tp: 1.2628 at price 1.3148
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #18 buy 0.10 EURUSD at 1.3135 sl: 1.2635 tp: 1.3635 at price 1.3145
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #16 sell 0.10 EURUSD at 1.3135 sl: 1.3635 tp: 1.2635 at price 1.3148
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #14 buy 0.10 EURUSD at 1.3121 sl: 1.2621 tp: 1.3621 at price 1.3145
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #12 sell 0.10 EURUSD at 1.3097 sl: 1.3597 tp: 1.2597 at price 1.3148
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #10 buy 0.10 EURUSD at 1.3108 sl: 1.2608 tp: 1.3608 at price 1.3145
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №1
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №2
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №3
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №1
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №2
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №3
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №1
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №2
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №3
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №1
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №2
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №3
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #4 sell 0.10 EURUSD at 1.3183 sl: 1.3683 tp: 1.2683 at price 1.3148
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #8 sell 0.10 EURUSD at 1.3168 sl: 1.3668 tp: 1.2668 at price 1.3148
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №1
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №2
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №3
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #6 buy 0.10 EURUSD at 1.3156 sl: 1.2656 tp: 1.3656 at price 1.3145
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): delete #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
19:56:12 2005.03.03 12:00 FastClosingOfAllPositions(SpecialForRosh): close #2 buy 0.10 EURUSD at 1.3188 sl: 1.2688 tp: 1.3688 at price 1.3146
19:56:18 FastClosingOfAllPositions(SpecialForRosh): removed
Как видишь, ошибка 2 вылазит, особенно, если в этой куче ордеров пытаться удялить ордера только одного типа. Не понимаю, как это раньше никто с этим не сталкивался...
Спасибо за подробные комментарии, правда логику твоего советника я еще раньше понял. Единственно, чего я не пойму - почему у тебя ошибка вылезает, а уменя нет?
На работе вчера требовал (P4-1800 Dby2000), а дома (Celeron WinXP) не требует.
Вот в чем фишка :)
Пусть еще кто-ниубдь прогонит твоего советника.
22:22:42 FastClosingOfAllPositions(SpecialForRosh) inputs: Lots=0.1; TakeProfit=500; StopLoss=500;
22:22:42 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: Выполнен блок init
22:22:42 2005.01.19 23:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.19 23:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #2 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 ok
22:22:42 2005.01.19 23:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.19 23:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #4 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 ok
22:22:42 2005.01.19 23:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.19 23:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #6 buy 0.10 EURUSD at 1.3010 sl: 1.2510 tp: 1.3510 ok
22:22:42 2005.01.20 00:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 00:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #8 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 ok
22:22:42 2005.01.20 00:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 00:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #10 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 ok
22:22:42 2005.01.20 00:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 00:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #12 sell 0.10 EURUSD at 1.2993 sl: 1.3493 tp: 1.2493 ok
22:22:42 2005.01.20 00:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 00:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #14 buy 0.10 EURUSD at 1.2991 sl: 1.2491 tp: 1.3491 ok
22:22:42 2005.01.20 01:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 01:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #16 sell 0.10 EURUSD at 1.2999 sl: 1.3499 tp: 1.2499 ok
22:22:42 2005.01.20 01:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 01:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #18 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 ok
22:22:42 2005.01.20 01:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 01:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #20 sell 0.10 EURUSD at 1.3003 sl: 1.3503 tp: 1.2503 ok
22:22:42 2005.01.20 01:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #21 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 01:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #22 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 ok
22:22:42 2005.01.20 02:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #23 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 02:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #24 sell 0.10 EURUSD at 1.3007 sl: 1.3507 tp: 1.2507 ok
22:22:42 2005.01.20 02:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #25 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 02:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #26 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 ok
22:22:42 2005.01.20 02:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #27 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 02:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #28 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 ok
22:22:42 2005.01.20 02:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #29 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 02:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #30 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 ok
22:22:42 2005.01.20 03:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #31 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 03:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #32 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 ok
22:22:42 2005.01.20 03:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #33 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 03:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #34 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 ok
22:22:42 2005.01.20 03:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #35 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 03:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #36 sell 0.10 EURUSD at 1.3007 sl: 1.3507 tp: 1.2507 ok
22:22:42 2005.01.20 03:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #37 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 03:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #38 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 ok
22:22:42 2005.01.20 04:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #39 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 04:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #40 sell 0.10 EURUSD at 1.3009 sl: 1.3509 tp: 1.2509 ok
22:22:42 2005.01.20 04:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #41 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 04:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #42 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 ok
22:22:42 2005.01.20 04:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #43 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 04:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #44 sell 0.10 EURUSD at 1.3017 sl: 1.3517 tp: 1.2517 ok
22:22:42 2005.01.20 04:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #45 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 04:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #46 buy 0.10 EURUSD at 1.3021 sl: 1.2521 tp: 1.3521 ok
22:22:42 2005.01.20 05:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #47 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 05:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #48 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 ok
22:22:42 2005.01.20 05:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #49 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 05:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #50 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 ok
22:22:42 2005.01.20 05:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #51 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 05:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #52 sell 0.10 EURUSD at 1.3014 sl: 1.3514 tp: 1.2514 ok
22:22:42 2005.01.20 05:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #53 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 05:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #54 buy 0.10 EURUSD at 1.3017 sl: 1.2517 tp: 1.3517 ok
22:22:42 2005.01.20 06:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #55 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:00 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #56 sell 0.10 EURUSD at 1.3009 sl: 1.3509 tp: 1.2509 ok
22:22:42 2005.01.20 06:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #57 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:15 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #58 buy 0.10 EURUSD at 1.3010 sl: 1.2510 tp: 1.3510 ok
22:22:42 2005.01.20 06:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #59 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:30 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: open #60 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #60 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #59 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #58 buy 0.10 EURUSD at 1.3010 sl: 1.2510 tp: 1.3510 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #57 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #56 sell 0.10 EURUSD at 1.3009 sl: 1.3509 tp: 1.2509 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #55 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #54 buy 0.10 EURUSD at 1.3017 sl: 1.2517 tp: 1.3517 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #53 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #52 sell 0.10 EURUSD at 1.3014 sl: 1.3514 tp: 1.2514 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #51 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #50 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #49 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #48 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #47 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #46 buy 0.10 EURUSD at 1.3021 sl: 1.2521 tp: 1.3521 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #45 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #44 sell 0.10 EURUSD at 1.3017 sl: 1.3517 tp: 1.2517 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #43 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #42 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #41 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #40 sell 0.10 EURUSD at 1.3009 sl: 1.3509 tp: 1.2509 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #39 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #38 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #37 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #36 sell 0.10 EURUSD at 1.3007 sl: 1.3507 tp: 1.2507 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #35 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #34 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #33 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #32 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #31 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #30 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #29 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #28 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #27 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #26 buy 0.10 EURUSD at 1.3012 sl: 1.2512 tp: 1.3512 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #25 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #24 sell 0.10 EURUSD at 1.3007 sl: 1.3507 tp: 1.2507 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #23 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #22 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #21 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #20 sell 0.10 EURUSD at 1.3003 sl: 1.3503 tp: 1.2503 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #18 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #16 sell 0.10 EURUSD at 1.2999 sl: 1.3499 tp: 1.2499 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #14 buy 0.10 EURUSD at 1.2991 sl: 1.2491 tp: 1.3491 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #12 sell 0.10 EURUSD at 1.2993 sl: 1.3493 tp: 1.2493 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #10 buy 0.10 EURUSD at 1.3008 sl: 1.2508 tp: 1.3508 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #8 sell 0.10 EURUSD at 1.3005 sl: 1.3505 tp: 1.2505 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #6 buy 0.10 EURUSD at 1.3010 sl: 1.2510 tp: 1.3510 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #4 sell 0.10 EURUSD at 1.3011 sl: 1.3511 tp: 1.2511 at price 1.3008
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: close #2 buy 0.10 EURUSD at 1.3014 sl: 1.2514 tp: 1.3514 at price 1.3005
22:22:42 2005.01.20 06:45 FastClosingOfAllPositions(SpecialForRosh) EURUSD,M15: delete #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
Количесвто ордеров не влияет, ошибка № 2 не появляетсся. И еще - какой у тебя брокер?
00:28:14 FastClosingOfAllPositions(SpecialForRosh): loaded successfully
00:28:23 FastClosingOfAllPositions(SpecialForRosh) inputs: Lots=0.1; TakeProfit=500; StopLoss=500;
00:28:23 FastClosingOfAllPositions(SpecialForRosh): Выполнен блок init
00:28:24 2004.06.17 11:45 FastClosingOfAllPositions(SpecialForRosh): open #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 11:45 FastClosingOfAllPositions(SpecialForRosh): open #2 buy 0.10 EURUSD at 1.2045 sl: 1.1545 tp: 1.2545 ok
00:28:24 2004.06.17 12:00 FastClosingOfAllPositions(SpecialForRosh): open #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 12:00 FastClosingOfAllPositions(SpecialForRosh): open #4 sell 0.10 EURUSD at 1.2043 sl: 1.2543 tp: 1.1543 ok
00:28:24 2004.06.17 12:15 FastClosingOfAllPositions(SpecialForRosh): open #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 12:15 FastClosingOfAllPositions(SpecialForRosh): open #6 buy 0.10 EURUSD at 1.2066 sl: 1.1566 tp: 1.2566 ok
00:28:24 2004.06.17 12:30 FastClosingOfAllPositions(SpecialForRosh): open #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 12:30 FastClosingOfAllPositions(SpecialForRosh): open #8 sell 0.10 EURUSD at 1.2056 sl: 1.2556 tp: 1.1556 ok
00:28:24 2004.06.17 12:45 FastClosingOfAllPositions(SpecialForRosh): open #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 12:45 FastClosingOfAllPositions(SpecialForRosh): open #10 buy 0.10 EURUSD at 1.2065 sl: 1.1565 tp: 1.2565 ok
00:28:24 2004.06.17 13:00 FastClosingOfAllPositions(SpecialForRosh): open #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 13:00 FastClosingOfAllPositions(SpecialForRosh): open #12 sell 0.10 EURUSD at 1.2054 sl: 1.2554 tp: 1.1554 ok
00:28:24 2004.06.17 13:15 FastClosingOfAllPositions(SpecialForRosh): open #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 13:15 FastClosingOfAllPositions(SpecialForRosh): open #14 buy 0.10 EURUSD at 1.2058 sl: 1.1558 tp: 1.2558 ok
00:28:24 2004.06.17 13:30 FastClosingOfAllPositions(SpecialForRosh): open #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 13:30 FastClosingOfAllPositions(SpecialForRosh): open #16 sell 0.10 EURUSD at 1.2053 sl: 1.2553 tp: 1.1553 ok
00:28:24 2004.06.17 13:45 FastClosingOfAllPositions(SpecialForRosh): open #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 13:45 FastClosingOfAllPositions(SpecialForRosh): open #18 buy 0.10 EURUSD at 1.2052 sl: 1.1552 tp: 1.2552 ok
00:28:24 2004.06.17 14:00 FastClosingOfAllPositions(SpecialForRosh): open #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:00 FastClosingOfAllPositions(SpecialForRosh): open #20 sell 0.10 EURUSD at 1.2057 sl: 1.2557 tp: 1.1557 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #20 sell 0.10 EURUSD at 1.2057 sl: 1.2557 tp: 1.1557 at price 1.2048
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #19 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #18 buy 0.10 EURUSD at 1.2052 sl: 1.1552 tp: 1.2552 at price 1.2045
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #17 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #16 sell 0.10 EURUSD at 1.2053 sl: 1.2553 tp: 1.1553 at price 1.2048
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #15 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #14 buy 0.10 EURUSD at 1.2058 sl: 1.1558 tp: 1.2558 at price 1.2045
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #13 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #12 sell 0.10 EURUSD at 1.2054 sl: 1.2554 tp: 1.1554 at price 1.2048
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #11 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #10 buy 0.10 EURUSD at 1.2065 sl: 1.1565 tp: 1.2565 at price 1.2045
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #9 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUYSTOP, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUYSTOP, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUYSTOP, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера BUY, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #7 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELL, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #6 buy 0.10 EURUSD at 1.2066 sl: 1.1566 tp: 1.2566 at price 1.2045
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #5 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #4 sell 0.10 EURUSD at 1.2043 sl: 1.2543 tp: 1.1543 at price 1.2048
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #3 buy stop 0.10 EURUSD at 1.4000 sl: 1.3500 tp: 1.4500 ok
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #2 buy 0.10 EURUSD at 1.2045 sl: 1.1545 tp: 1.2545 at price 1.2045
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №1
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №2
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): Alert: Ошибка (2) закрытия ордера SELLSTOP, попытка №3
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): close #8 sell 0.10 EURUSD at 1.2056 sl: 1.2556 tp: 1.1556 at price 1.2048
00:28:24 2004.06.17 14:15 FastClosingOfAllPositions(SpecialForRosh): delete #1 sell stop 0.10 EURUSD at 1.1000 sl: 1.1500 tp: 1.0500 ok
И заметь, после OrderTicket 9 почему-то идет OrderTicket 7, имхо функция OrderSelect у меня что-то путает, отсюда видать и ошибка. Почему так, не знаю... А и ещё одно, ты попробуй закрывать только ордера BUY и SELL, при том, что будут открыты ордера всех четырёх типов...
Возьми билд 186 от 17.11.05 с этого сайта.