Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 69

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello!
Please explain to those with more experience, why do I need to use the NormalizeDouble function "in all calculated values"? I've written a dozen EAs, I've done without it everywhere. Everything works. And now I've flipped through the textbook and came across some examples, and I don't understand their logic. Here is an example:
if (NormalizeDouble(SL,Digits)<NormalizeDouble(Bid-TS*Point,Digits))
{
SL=Bid-TS*Point;
string Text="Buy"; // Text for Buy
Modify=true; // Assigned to modify.
}
Why do you need NormalizeDouble, ? Everything works fine without it. You may write the code in this way:
If(SL<Bid-TS*Point)
{
SL=Bid-TS*Point;
string Text="Buy "; // Text for Buy
Modify=true; // Assigned to modify.
}
And you will get the same result.
So what is the point? Why should I round something if my equation has a sign (<) instead of (==)?
Good afternoon.
Help me out here.
dist = MathAbs((NormalizeDouble(Bid,Digits)-
NormalizeDouble(ObjectGetValueByShift(TrendLineName,0),Digits))*MathPow(10,Digits));
The code finds the distance from the current price level to the trend according to TrendLineName. But there is a problem: apparently the trend is inaccurately transmitted between halves, which is why the distance to the price is different for different halves. How to get around this problem? Ideally, even if the trendline is displayed only on H1, at open time W1 (in fact at any open time) the calculated distance should be the same.
What is the maximum number of elements in an array?
Hello, I've just started to learn mql4, I'm currently developing an Expert Advisor with 4 indices. I have started development of an mql4 Expert Advisor with 4 indicators. The code should compile, but it is not working in the Strategy Tester, i.e. I have no results. Please help me to fix a logical or other errors, here is part of the code, as I think the problem may be in the indices of the indicator line, thanks in advance
You are comparing the buffer value with the colour the buffer is displayed in.
Lift your eyes to the top of the site - there is more than enough material to at least understand the basics.
Hello, I just started to learn mql4, I am currently developing an Expert Advisor with 4 indices. The code compiles well, but it is not working in the tester, i.e. no results. Please help me to fix a logical or other errors, part of the code here, i think the problem may be in the indicator line indices, thanks in advance.
So, just out of curiosity, do you have these indices with more than one line? You use the second line everywhere, is this how it should be?
And about the tester, what mode do you use?
And about the code, you are comparing fractional numbers without normalisation. Equality will be difficult to achieve.
How do I display an indicator on the daily chart for which the signal is calculated based on the 15 minute EMA timeframe reading?
You are comparing the buffer value with the colour the buffer is displayed in.
Lift your eyes to the top of the site - there is more than enough material to at least understand the basics.
I apologise for the nonsense written above, I've just started studying, it's hard to get into it straight away. I've been studying for a whole day and I've understood about buffers. I have a custom indicator, it's a histogram, all values are maximum, it only matters the colour of bars in the histogram, it has no input parameters, buffers 2: 0 - with the red bar, and 1 - blue bar, the imperial method, I found that in 0 buffer does not change value, and 1 does. How to write the criteria for the transaction I can't understand, please explain how, thanks in advance.
So, just out of curiosity, do you have these indices with more than one line? You use the second line everywhere, is it supposed to be like this?
And about the tester, what mode do you use?
And about the code, you are comparing fractional numbers without normalization. Equality would be difficult to achieve.
After the top post, I think there are no more questions)) about the tester, not really understood, with or without visual?