Errors, bugs, questions - page 2734

 
Tests have to be done correctly and very carefully.

Plus reproducible. Plus it's out of the question to run someone else's dll without compiling it yourself from source.
 

Good afternoon everyone, I would like to ask about the following thing

I am a beginner, maybe someone can explain me

I opened a demo account with different traders, not only in Russia, I ran into a problem: I can't place lots in the market, i.e. I can but only at the market price! I can only put lots at the market price!

Probably I do not know something!

I can go anywhere through the market and they will take my order anyway. But I can't do that on the forex terminals, I can only buy at the market price with a huge spread!

Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
, то позиции по каждому символу разрешается закрывать только в том порядке, в котором они были открыты — сначала самую старую, затем более новую и т.д. При попытке закрыть позиции в ином порядке будет получена ошибка. Уровень залоговых средств, при достижении которого происходит принудительное закрытие самой убыточной позиции (Stop Out...
 
the website is not working
 
Vladimir Pastushak:
the website's psc doesn't work
.
 
Alexey Viktorov:
.

It's working now.

 
Renat Fatkhullin:
Tests have to be done properly and very carefully.

no tests were planned, just to assess the capabilities

OK, let's consider that in this florid way, you have refused, I offered the VS sources above

 

Good afternoon!

Trailing function.

Can you tell me what's wrong with it, I get 4756 error in strategy tester. Running it in the script, it works.

int Tralling(int PointsTral=200)
  {
   MqlTradeRequest Request;
   MqlTradeResult Result;
   int PosTot, i, digits;
   string Symbols[]= {""};
   double SymbPt,sl,tp,
          PriceOpen[]= {0};
   i=0;
   PosTot= PositionsTotal();
   if(PosTot>0)
     {
      while(i<PosTot)
        {
         Symbols[i] = PositionGetSymbol(i);
         digits=(int)SymbolInfoInteger(Symbols[i],SYMBOL_DIGITS);
         if(PositionSelect(Symbols[i]))
           {
            PriceOpen[i] = PositionGetDouble(POSITION_PRICE_OPEN);
            SymbPt = SymbolInfoDouble(Symbols[i],SYMBOL_POINT);
            if(PositionGetInteger(POSITION_TYPE) == 0)
              {
               if(SymbolInfoDouble(Symbols[i],SYMBOL_BID) >= PriceOpen[i]+(SymbPt*PointsTral))
                 {
                  if(SymbolInfoDouble(Symbols[i],SYMBOL_BID)>PositionGetDouble(POSITION_SL)+(SymbPt*PointsTral))
                    {
                     sl=SymbolInfoDouble(Symbols[i],SYMBOL_BID)-(SymbPt*PointsTral);
                     tp=PositionGetDouble(POSITION_TP);
                     Request.action=TRADE_ACTION_SLTP;
                     Request.symbol = Symbols[i];
                     Request.sl=NormalizeDouble(sl,digits);
                     Request.tp=NormalizeDouble(tp,digits);
                     Request.position=PositionGetInteger(POSITION_TICKET);
                     if(!OrderSend(Request,Result))
                        Alert("Ошибка Треллинга ",GetLastError());
                    }
                 }
              }

            if(PositionGetInteger(POSITION_TYPE) == 1)
              {
               if(SymbolInfoDouble(Symbols[i],SYMBOL_ASK) <= PriceOpen[i]-(SymbPt*PointsTral))
                 {
                  if(SymbolInfoDouble(Symbols[i],SYMBOL_ASK)<PositionGetDouble(POSITION_SL)-(SymbPt*PointsTral))
                    {
                     sl=SymbolInfoDouble(Symbols[i],SYMBOL_ASK)+(SymbPt*PointsTral);
                     tp=PositionGetDouble(POSITION_TP);
                     Request.action=TRADE_ACTION_SLTP;
                     Request.symbol = Symbols[i];
                     Request.sl=NormalizeDouble(sl,digits);
                     Request.tp=NormalizeDouble(tp,digits);
                     Request.position=PositionGetInteger(POSITION_TICKET);
                     if(!OrderSend(Request,Result))
                        Alert("Ошибка Треллинга ",GetLastError());
                    }
                 }
              }

           }
         else
           {
            Alert("Не удалось выделить оредер по символу. ", Symbols[i], " Ошибка ", GetLastError());
           }
         i++;
        }
     }
   return (1);
  }

Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Тикет позиции. Уникальное число, которое присваивается каждой вновь открытой позиции. Как правило, соответствует тикету ордера, в результате которого она была открыта, за исключением случаев изменения тикета в результате служебных операций на сервере. Например, начисления свопов переоткрытием позиции. Для нахождения ордера, которым была открыта...
 

Good afternoon!

I can't find the error. It's a Tralling stop. If I throw it on the chart with the script, it works. In the strategy tester, it returns error 4756 (Cannot send to server)

Please help me!

int Tralling(int PointsTral=200)
  {
   MqlTradeRequest Reques;
   MqlTradeResult Result;
   int PosTot, i, digits;
   string Symbols;
   double SymbPt,sl,tp,
          PriceOpen;
   i=0;
   PosTot= PositionsTotal();
   if(PosTot>0)
     {
      while(i<PosTot)
        {
         Symbols = PositionGetSymbol(i);
         digits=(int)SymbolInfoInteger(Symbols,SYMBOL_DIGITS);
         if(PositionSelect(Symbols))
           {
            PriceOpen = PositionGetDouble(POSITION_PRICE_OPEN);
            SymbPt = SymbolInfoDouble(Symbols,SYMBOL_POINT);
            if(PositionGetInteger(POSITION_TYPE) == 0)
              {
               if(SymbolInfoDouble(Symbols,SYMBOL_BID) >= PriceOpen+(SymbPt*PointsTral))
                 {
                  if(SymbolInfoDouble(Symbols,SYMBOL_BID)>PositionGetDouble(POSITION_SL)+(SymbPt*PointsTral))
                    {
                     sl=SymbolInfoDouble(Symbols,SYMBOL_BID)-(SymbPt*PointsTral);
                     tp=PositionGetDouble(POSITION_TP);
                     Reques.action=TRADE_ACTION_SLTP;
                     Reques.symbol = Symbols;
                     Reques.position=PositionGetInteger(POSITION_TICKET);
                     Reques.sl=NormalizeDouble(sl,digits);
                     Reques.tp=NormalizeDouble(tp,digits);
                     if(!OrderSend(Reques,Result))
                        Alert("Ошибка Треллинга ",GetLastError());
                    }
                 }
              }

            if(PositionGetInteger(POSITION_TYPE) == 1)
              {
               if(SymbolInfoDouble(Symbols,SYMBOL_ASK) <= PriceOpen-(SymbPt*PointsTral))
                 {
                  if(SymbolInfoDouble(Symbols,SYMBOL_ASK)<PositionGetDouble(POSITION_SL)-(SymbPt*PointsTral))
                    {
                     sl=SymbolInfoDouble(Symbols,SYMBOL_ASK)+(SymbPt*PointsTral);
                     tp=PositionGetDouble(POSITION_TP);
                     Reques.action=TRADE_ACTION_SLTP;
                     Reques.symbol = Symbols;
                     Reques.position=PositionGetInteger(POSITION_TICKET);
                     Reques.sl=NormalizeDouble(sl,digits);
                     Reques.tp=NormalizeDouble(tp,digits);
                     if(!OrderSend(Reques,Result))
                        Alert("Ошибка Треллинга ",GetLastError());
                    }
                 }
              }

           }
         else
           {
            Alert("Не удалось выделить оредер по символу. ", Symbols[i], " Ошибка ", GetLastError());
           }
         i++;
        }
     }

   return (1);
  }
 
Igor Makanu:

no tests were planned, just to assess the capabilities

OK, let's consider that in this florid way, you have refused, I offered the VS sources above

You made an exceptional claim and failed to prove it. It's also not the first time you've posted a dll, which is forbidden.

I don't see the source code for reproduction.

 
Renat Fatkhullin:

You have made an exceptional claim and failed to prove it. Also, it's not the first time you've posted a dll, which is forbidden.

I don't see the source code for reproduction.

What does the exclusivity of the statement show? All I see is that the performance measurement for the old terminal gave very good results, imho, as they say - a good thing made for ages.

I checked it on PC today and got the same results as MT4/MT5, checked it on the laptop again, also I have not seen any difference, the high probability that in the background of some service Win10 "chewed up the drive", I have not configured the runtime on the laptop, Win configured the night time by default.

At night there was still the desire to understand what the difference, today on a principle - let it work, I do not see the source code does not make sense to make comments or cut out parts to begin clarification of the situation or discussion, I do not want to do it.


Of the bugs of the new build:

is not correct information in terminal log:

2020.05.06 19:03:03.895 Terminal Windows 10 build 18363, Intel Core i3 M 380 @ 2.53GHz, 0 / 2 Gb memory, 149 / 237 Gb disk, IE 11, UAC, GMT+4

Win free 920 MB of 2.97 GB in task manager, previous builds had more correct system info

Reason: