[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 630

 

Good afternoon!

I often see this construction of the entry:

limit = Bars - PeriodSMA -1 //--- PeriodSMA - какой либо период задаваемый пользователем

What does this entry mean, why do I need to reduce the number of bars by the number of PeriodSMAs?

 
ikatsko:
Why not? Yes, it does! Following alsu's advice, everything works. Only not OBJ_TRENDLINE, but OBJ_TREND

There are other options/objects in Mt4 to solve your problem. See https://docs.mql4.com/ru/constants/objects
 
Roll:

There are other options/objects available in Mt4 to solve your problem. See https://docs.mql4.com/ru/constants/objects
The easiest way to draw a segment is to draw a segment... Why invent something else when MQL has exactly the object you need, OBJ_TREND?
 
Fox_RM:

Good afternoon!

I often see this construction of the entry:

What does this entry mean, why do I need to reduce the number of bars by the number of PeriodSMAs?

It means that for the calculation of the indicator on the current bar we need a certain number of previous price values, in this case PeriodSMA. If we do not decrease the index of the initial bar, we will have several incorrectly calculated indicator values at the very left end of the chart.
 
alsu:
The easiest way to draw a segment is to... draw a segment... Why invent something else, when MQL has exactly the object you need, OBJ_TREND?

You just shouldn't invent something that doesn't exist. For example: There is no such object in MT4 - "point".
 
Roll:

Just don't make up things that don't exist.
What do you mean it doesn't exist?))) Did I miss the new build of MT where the trend lines disappeared?
 
alsu:
What do you mean no?))) Did I miss the new build of MT where the trend lines disappeared?

That's what I mean -"...OBJECT is a finite-length TENDENCY."
 
Roll:

That's what I mean -"..."...OBJ_TREND is an OBJPROP_RAY=false.
So that's what it is - OBJ_TREND, with property OBJPROP_RAY=false
 
alsu:
That is what it is - OBJ_TREND with property OBJPROP_RAY=false.


OBJ_TRENDBYANGLE, OBJ_TRIANGLE and OBJ_ELLIPSE can also be fitted there. And OBJ_TREND can be considered a "point". According to this logic.

Your solution is the simplest and therefore the best. But it's only a solution to the problem, not an MT4 object - "OBJPROP_RAY of finite length".

 
Roll:


You can fit OBJ_TRENDBYANGLE, OBJ_TRIANGLE and OBJ_ELLIPSE there too. And OBJ_TREND can be considered a "point". According to this logic.

Your solution is the simplest and therefore the best. But it's only a solution to the problem, not an MT4 object - "A finite-length TIP".

The question was asked quite correctly and understandably.

If a person doesn't know how and by what he/she can draw a sloping segment of a finite length on a chart, he/she asks exactly this question using the names we all understand - to draw an object.

The answer was a hint - this object is OBJ_TREND.

Try to formulate the same question in a different way, so that no one picks on it... ;)