Questions from Beginners MQL5 MT5 MetaTrader 5 - page 434

 
Artyom Trishkin:
The colour of the comment cannot be changed. If you want a colour, you can change it by objects.
Why do I have 0 ? I am interested in error, not examples. I will copy and paste the example, but the notion of error remains unknown.
 
Leanid Aladzyeu:
Why do I get 0 ? I'm interested in the error, not the examples. I will copy and paste the example, but the notion of error remains unknown.

try removing Point - what will it say?

I think Point() is correct.

 
new-rena:

try removing Point - what will it say?

in my opinion the correct Point()

double p1=(NormalizeDouble(iHigh(Symbol(),PERIOD_MN1,1),Digits)-NormalizeDouble(iLow(Symbol(),PERIOD_MN1,1),Digits)); Print("Bar size 1 = ", p1);

0,0 total. without point and with point with brackets. I tried arrays like this . all for 0.0.

int  imax5=iHighest(Symbol(),PERIOD_MN1,MODE_HIGH,3,1);Print("max1=====", imax5);
    double   max5= iHigh(Symbol(),PERIOD_MN1,imax5);Print("max2=====", max5);
    max5=NormalizeDouble(max5,Digits);Print("max3=====", max5);
 
Leanid Aladzyeu:

double p1=(NormalizeDouble(iHigh(Symbol(),PERIOD_MN1,1),Digits)-NormalizeDouble(iLow(Symbol(),PERIOD_MN1,1),Digits)); Print("Bar size 1 = ", p1);

0,0 total. without point and with point with brackets. I tried arrays like this . all for 0.0.

Try it this way

 double p1=(NormalizeDouble(iHigh(Symbol(),PERIOD_MN1,1),Digits)-NormalizeDouble(iLow(Symbol(),PERIOD_MN1,1),Digits)); 
Print("Величина бара 1 = ", DoubleToString(p1, Digits));

Leanid Aladzyeu:
Why do I get 0? I'm interested in errors, not in examples. I may copy and paste the example, but the error concept remains unknown.
Because Print() and Alert() prints double numbers down to 4 digits, while the result is a 5-digit number. To see the fifth digit you must convert the number to a string.
 
Alexey Viktorov:

Try this

 double p1=(NormalizeDouble(iHigh(Symbol(),PERIOD_MN1,1),Digits)-NormalizeDouble(iLow(Symbol(),PERIOD_MN1,1),Digits)); 
Print("Величина бара 1 = ", DoubleToString(p1, Digits));
Мне говорили что моя версия была с багом на массивы iclose[] , получается что и на функцию багом попало  или в терминале не хватает истории  тоже врядли история с начала загружена ,

 
Leanid Aladzyeu:

I was only saying that there was one build with this error, I read about it on this forum, but did not say that POSSIBLY you have this build.

Regarding zeros I corrected, supplemented my previous post with a little delay.


If you get zero in the fifth digit too, set Print() for both the minus and the subtractor. Maybe they are the same? Although they should not be. But it's the printers that should be looking for the cause.

 
Alexey Viktorov:

I was only saying that there was one build with this error, I read about it on this forum, but did not say that POSSIBLY you have this build.

About the zeros I corrected, added to my previous post a bit late.


If you get zero in the fifth digit too, set Print() for both the subtractor and the subtractor. Maybe they are the same? Although they shouldn't be. But you need to look for the cause with the printers.

This is cruel)) how to fix it?

4074
 ERR_NO_MEMORY_FOR_HISTORY
 Не хватает памяти для исторических данных
 
 
Alexey Viktorov:

Because it's misspelled.

Are you sure? Before writing I ran this construction with AAA = true and AAA = false - everything works. When true, it returns (string)c, when false, it returns "offline". Negative values of number of orders cannot be, so it fits exactly.
 
Leanid Aladzyeu:
Why do I get 0? I'm interested in the error, not the examples. I will copy and paste the example, but the error notion remains unknown.

There is no error. The script

#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   double p1=(NormalizeDouble(iHigh(Symbol(),PERIOD_MN1,1),Digits)-NormalizeDouble(iLow(Symbol(),PERIOD_MN1,1),Digits))/Point; 
   Print("Величина бара 1 = ", p1);
  }
//+------------------------------------------------------------------+

It shows up in the log.

2015.09.05 05:00:09.558 Script SizeCandle USDJPY,Daily: removed
2015.09.05 05:00:09.557 SizeCandle USDJPY,Daily: uninit reason 0
2015.09.05 05:00:09.557 SizeCandle USDJPY,Daily: Величина бара 1 = 9122.0
2015.09.05 05:00:09.556 SizeCandle USDJPY,Daily: initialized
2015.09.05 05:00:09.541 Script С форума\SizeCandle USDJPY,Daily: loaded successfully

Only I still do not understand why you need double to output an integer value (because the number of points is an integer).

 

connoisseurs, help.

I need a font to write wave markings in MT-4. i.e. letters and numbers in circles.