Errors, bugs, questions - page 126

 
Yedelkin:

So what's the difference?

If the stop loss or take profit price for a position is set at a distance shorter than the freezing level from the current price, you cannot do anything with the position (close it, modify it). The same for orders, if the open price is on the distance smaller than the freezing level from the current price - you can't delete or modify such an order. And stop_level - distances for setting stops, takeoffs, opening orders and positions. They do not prevent you from modifying an already open position/order (for example, to move a stop loss farther away, although the price is already at a distance smaller than the stop_level). Normally, freeze_level = 0. Although, there may be exceptions
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы - Документация по MQL5
 

When run in the Strategy Tester, this EA does not process the period 2010.08.30 16:01:00-2010.08.30 16:59:00.

However, if you uncommentthe operator return in line 55, this period will be processed.

The Strategy Tester was run on the period 2010.08.30-2010.09.01 with M1 , only the opening price.

MetaTrader 5 build 324 (08 Sep 2010)

//+------------------------------------------------------------------+
//|                                                         exp1.mq5 |
//|                        Copyright 2010, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2010, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>
#include <Trade\PositionInfo.mqh>

bool orderOpen=false;
datetime printTime;
int count=1;

int OnInit()
  {
//---
//---
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+

void OnTick()//тестировался период  2010.08.30-2010.09.01
{
   MqlRates rt[4];
   MqlRates rt2[3];
   //--- go trading only for first ticks of new bar
   if(CopyRates(_Symbol,PERIOD_M1,0,4,rt)!=4)
   {
      Print("CopyRates of ",_Symbol," failed, no history 1");
      return;
   }
   
   if((rt[2].close-rt[0].open)<-0.00135)
   {
      if(printTime!=rt[3].time)
      {
         Print(count,".   rt[2].close-rt[0].open=",DoubleToString(rt[2].close-rt[0].open,4),"   time=",rt[3].time," rt[0].open=",rt[0].open," rt[2].close=",rt[2].close); 
         printTime=rt[3].time;
         count++;
         //return;  //строка 55
      }
      if(CopyRates(_Symbol,PERIOD_M30,0,3,rt2)!=3)
      {
         Print("CopyRates of ",_Symbol," failed, no history 2");
         return;
      }
   }
}
Files:
exp.mq5  3 kb
 
Insert the code correctly in your messages, please.
MQL5.community - Памятка пользователя
MQL5.community - Памятка пользователя
  • 2010.02.23
  • MetaQuotes Software Corp.
  • www.mql5.com
Вы недавно зарегистрировались и у вас возникли вопросы: Как вставить картинку в сообщение на форуме, как красиво оформить исходный код MQL5, где находятся ваши Личные сообщения? В этой статье мы подготовили для вас несколько практических советов, которые помогут быстрее освоиться на сайте MQL5.community и позволят в полной мере воспользоваться доступными функциональными возможностями.
 
olyakish

The developers seem to have bent the compiler.

here is the test log after compilation in the new 324 build

Experts that were compiled in build 321 in 324 tester are successfully tested, after recompiling in the new build we get an error.

Is it a general problem or am I the only one affected ?


xeon: I have the same problem :-(

Better the same...

Here -https://www.mql5.com/ru/forum/2010 same error, same temporary solution (when new build.... comes out)
 
xeon:

... when the next build is due out ...
The next build is scheduled for release on Monday
 
mql5:
The next build is scheduled for release on Monday
There's not much time left before registration ends, so every hour counts. :-)
 
notused:
If the stop loss or take profit price for a position is less than the freezing level from the current price, you cannot do anything with the position (close it, modify it). The same is for orders where the open price is at a distance shorter than the freezing level from the current price - you can't delete or modify such an order. And stop_level - distances for setting stops, takeovers, opening orders and positions. They do not prevent you from modifying an already open position/order (for example, to move the stop loss further away, although the price is already at a distance shorter than the stop_level). Usually freeze_level = 0. Although, there are exceptions.
Thanks for the clarification!
 
xeon:

xeon: I have the same problem :-(

Better I have the same problem...

Here -https://www.mql5.com/ru/forum/2010 same error, respectively same temporary solution (when the new build comes out....)
The "workaround" helped, thanks
 

Greetings!

really like the vertical layout of the tools, but in MT5 there is a nasty residual text... please fix it, it hurts the eye :)

 
       int a = 0;
       if(a==1){Print("TEST");}
The compiler does not detect the absence of a second equal sign as an error.
Reason: