[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 79

 
albion:
I ask all experts to look through the topic https://forum.mql4.com/ru/38745#429784.

Please start writing your own code and discuss anything you don't understand in this thread, and don't forget to show the part of the code where you encounter difficulties
 
drknn:

Any ideas?
 
NameLess:


point_low=NormalizeDouble(iBands(NULL,0,50,2,0,PRICE_CLOSE,MODE_LOWER,0),Digits);

wot)


And what does digits equal? Create a new script in which you write just one line:

Print("Дигитс данной валютной пары нормализует до ",Digits," знаков после запятой");
 
drknn:


What does digits equal? Create a new script in which you write just one line:


already checked, it's correct( it's a terminal constant.
 
drknn:


What does digits equal? Create a new script in which you write just one line:


I'm trying to find iMA's source code, maybe the conversion is not working properly, because all the calculations come from ima, I have no more ideas((
 
NameLess:

already checked, it's correct( it's a terminal constant.

You did not answer my question. What is the digits of this currency pair? And by the way, what kind of currency pair is it and how many decimal places does it have and how many pips per tick does it move?
 
drknn:

You have not answered my question. What does the digits equal for this currency pair. And by the way, what kind of currency pair is it?

Digits is 5, it's a constant and it can't take any other value. eurobucks
 
NameLess:

digits equals 5, this constant cannot take a different value. eurobucks pair


Try it another way. Write the following on the first line of the Start function:

string SMB=Symbol();
int DGS=MarketInfo(SMB,MODE_DIGITS);
Print("Дигитс = ",Digits,"  DGS = ",DGS);
string Val="";
Val = iBands(NULL,0,50,2,0,PRICE_CLOSE,MODE_LOWER,0);
double point_low=iBands(NULL,0,50,2,0,PRICE_CLOSE,MODE_LOWER,0);
Print("Val = ",Val,"  point_low до нормализации = ",point_low);
point_low = NormalizeDouble(point_low,5);
Print("point_low после нормализации = ",point_low);
 

Maybe the value there ends with a zero and this last zero is simply discarded in the normalisation process? Discarded because the entry 0.1 is equivalent to 0.10 and zero is better discarded?

P.S.

You know, not having access to the terminal and to those quotes that you use, it is problematic to understand what is what - there is only one thing left - experiments.

 
drknn:


Try it another way. Write the following on the first line of the Start function


Thank you! I'll give it a try!