joo: I built the line. In the line properties I put a tick "ray to the left". I made sure that the anchor points of the line are on different days. The line should not be lower than the corresponding higher TF to be good on timeframes above D1 as well.
Tapochun: OK, but the issue here is not even more about this function, but rather that the lines "jump", i.e. the price coordinates of points at a point in time change when the scale is changed.
For "floating" objects it is of course better to give specific examples with screenshots etc.
But in general, the problem with the accuracy of rendering rests with the discreteness of translating date/price coordinates to XY coordinates on the chart, taking into account the scale on the chart. It's not like anyone is drawing at 1:1 scale.
We draw several trend lines. Get their price coordinates at the current time (using the script). Shift the scale. We re-derive the values of the trend lines at the current candle. Here is the result.
Talex: y=a+bx - that's the entire program implementation, why are you fogging it?
Don't talk about what you don't know.
When determining values of the trend line on the area of interest by some ordinary calculations, there is a "pitfall". Among other things, it may not appear immediately. Getting around this pitfall was the hardest part for me.
In general, it would be nice if the ObjectGetValueByTime function in MQL5 would work similar to MQL4 with results. It would not look as on the screenshot.
You can use the language tools. I have such an implementation (without using ObjectGetValueByTime).
I built the line. In the line properties I put a tick "ray to the left". I made sure that the anchor points of the line are on different days. The line should not be lower than the corresponding higher TF to be good on timeframes above D1 as well.
I.e., it's OK.
H1
W1
Okay. OK. Top to bottom and no other way around.
OK, but the issue here is not even more about this function, but rather that the lines "jump", i.e. the price coordinates of points at a point in time change when the scale is changed.
My price coordinates do not change when I change the scale.
More precisely, the same values of trend lines are displayed when the scale is changed (the scale does not affect the calculation of values)
What do you use to implement it, if it is not a secret?
Purely with the help of MQL5.
I just use indicators with this function not only for myself, but in the Market as well, that's why I apologize for not publishing the code here.
My price coordinates do not change when I change the scale.
More precisely, the same trendline values are displayed when the scale is changed.
Is it determined visually or programmatically?
Programmatically.
I added there in my post that my scale has no effect on the calculation of values.
But to puzzle over how to implement it - yes, there was such a thing in my time).
For "floating" objects it is of course better to give specific examples with screenshots etc.
But in general, the problem with the accuracy of rendering rests with the discreteness of translating date/price coordinates to XY coordinates on the chart, taking into account the scale on the chart. It's not like anyone is drawing at 1:1 scale.
Screenshots from MetaTrader trading platform
GBPUSD, M5, 2014.11.24
Alpari Limited, MetaTrader 5, Demo
temp_file_screenshot_13845.png
Programmatically.
I added in my post that my scale has no effect on the calculation of values.
But it's hard to figure out how to implement it - yes, I've done that in my time).
Programmatically.
I added in my post that my scale has no effect on the calculation of values.
But it's hard to figure out how to implement it - yes, I've done that in my time).
y=a+bx - that's the entire program implementation, why are you fogging it?
Don't talk about what you don't know.
When determining values of the trend line on the area of interest by some ordinary calculations, there is a "pitfall". Among other things, it may not appear immediately. Getting around this pitfall was the hardest part for me.
In general, it would be nice if the ObjectGetValueByTime function in MQL5 would work similar to MQL4 with results. It would not look as on the screenshot.