For example only Long
PLS SEE ATTACHED PICTURE TO UNDERSTAND MY PROBLEM
1.Indicator shows BullishDivergence: Bullish Arrow (Green)
-THIS IS THE ENDPOINT OF THE DIVERGENCE
2.Indicator has now a line which goes from Endpoint (BullishDivergence Arrow (Green))
TO A STARTPOINT (DIVERGENCE LINE GREEN)
My Question
I can read the arrow cause it is easy it has Buffer in this case its Buffer 3 of the indicator
But what is the Buffer of this line??? And how can I read it?
My Code and Try:
Indicator code:
That line is NOT on any buffer. That line is an OBJ_TREND
an OBJ_TREND is a kind of line you can use to draw diagonals line along any part of the chart. You passa 2 PRICE coordinates to the OBJ_TREND, or other Value which represents the Scale of the indicator or main chart.
Than OBJ_TREND creates an object LINE connecting those 2 points and this is the Green Line that you see there.
You can get, however, obtain the 2 coordination points that were passed to it. Those values are on some other buffer, which is as easy to read as the buffer3 containing the values for the arrow.
But intermediate values, which represents the path of the grren line between BEGIN and END points, does not exist at all, if you need it you will need to calculate the DIAGONAL using mathematics, considering you have the 2 essencial points, which is Begin and End, and you have a known vertical scale, so is the same an exercise on college to calculate a triangle diagonal by having a measure of the vertical scale + 2 reference points on any square
For the Chart Green OBJ_TREND, ir receives 4 values: The First candle Value (which is the time of the candle) + the Price Value, which is the vertical point of the Candle (This becomes POINT1)
Than 2 more values: The Second candle + the Price on the candle. (This becomes POINT 2)
and OBJ_TREND connects those 2 points, making a diagonal line.
You can mathematically, calculate a triangle, because you have BASE + HIGH values.
Then it is easy to calculate a triangle diagonal using simple formulas, and once you do it, you will be able to know any intermediate values of the diagonal, since any point of the diagonal are just references to the Base Scale and High Scale of the triangle
obj_trend MQL4
obj_trend MQL5

- docs.mql4.com
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For example only Long
PLS SEE ATTACHED PICTURE TO UNDERSTAND MY PROBLEM
1.Indicator shows BullishDivergence: Bullish Arrow (Green)
-THIS IS THE ENDPOINT OF THE DIVERGENCE
2.Indicator has now a line which goes from Endpoint (BullishDivergence Arrow (Green))
TO A STARTPOINT (DIVERGENCE LINE GREEN)
My Question
I can read the arrow cause it is easy it has Buffer in this case its Buffer 3 of the indicator
But what is the Buffer of this line??? And how can I read it?
My Code and Try:
Indicator code: