Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1177

 
Сергей Таболин:
And yet, how to get the price of the Fibonacci fan level on the current bar? Or is it an unsolvable problem?

The problem is solvable, but deserves its own topic. It has to be solved mathematically.

 
Uladzimir Izerski:

ObjectGetValueByTime

Doesn't work...


 
Aleksey Vyazmikin:

The problem is solvable, but deserves its own topic. It has to be solved mathematically.

The price of the trend line on the current bar can be obtained from the object on the chart, but the fan cannot... It is strange.

 
Сергей Таболин:

It doesn't work...


And it won't.

Forum on trading, automated trading systems & strategy testing

FAQ from Beginners MQL5 MT5 MetaTrader 5

Aleksey Vyazmikin, 2020.01.19 11:01

This problem is solvable, but it deserves a separate article. It must be solved mathematically.


When drawing a fan, only one line on the chart is created (Ctrl+B), from it (2 points) all the values of the fan should be calculated mathematically.

 

You can do it without the maths.

ety

 
Uladzimir Izerski:

You can do it without the maths.


You can. Build with trends.


but it's a crutch...
 
Сергей Таболин:

You can. Build with trends.


But it's a crutch...

You don't get it. This is done with µl tools usingObjectGetValueByTime.

I drew the scheme. And it can be calculated programmatically depending on the direction. There are no difficulties here. All you have to do is to understand it.

 
Сергей Таболин:

You can. Build with trends.


But it's a crutch...

I thought we were talking about the percentage of the fan...

Does the function work correctly in the strategy tester?

 
Uladzimir Izerski:

You have misunderstood. This is done by µl means usingObjectGetValueByTime.

I drew a diagram. And you can calculate it programmatically depending on the direction. There are no difficulties here. You just have to get into it.

So there is no mention in the instructions of the fan for this function

As an object in one price coordinate can have several values, a line number must be specified. This function is only applicable to the following objects:

  • Trend line (OBJ_TREND)
  • Trendline by angle (OBJ_TRENDBYANGLE)
  • Gann Line (OBJ_GANNLINE)
  • Equidistant channel (OBJ_CHANNEL) - 2 lines
  • Linear regression channel (OBJ_REGRESSION) - 3 lines
  • Standard deviation channel (OBJ_STDDEVCHANNEL) - 3 lines
  • Line with arrow (OBJ_ARROWED_LINE)
 
Aleksey Vyazmikin:

I thought it was about the percentage of the fan...

Does the function work correctly in the strategy tester?

Calculated usingObjectGetValueByTime price, we can find out any percentage of the fan.

It works in the tester. I didn't test it.

Reason: