Errors, bugs, questions - page 1249

 
DiPach:
You can use the language tools. I have such an implementation (without using ObjectGetValueByTime).
And what, if not a secret, is implemented through?
 
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.

I.e., it's OK.

H1


W1


Okay. OK. Top to bottom and no other way around.

 
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.

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)

 
Tapochun:
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.

 
DiPach:

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?
 
Tapochun:
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).

 
alexvd:

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.

Screenshots from MetaTrader trading platform

GBPUSD, M5, 2014.11.24

Alpari Limited, MetaTrader 5, Demo

temp_file_screenshot_13845.png

GBPUSD, M5, 2014.11.24, Alpari Limited, MetaTrader 5, Demo


Files:
 
DiPach:

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 whole software implementation, why fog it up?


 
DiPach:

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).

Let me try to guess... by determining the increment between line points on two adjacent candlesticks?
 
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.

Reason: