Errors, bugs, questions - page 1483

 
Artyom Trishkin:
I don't understand everything that has to do with reading data from graphical objects. Well, of course, it is necessary, but... If we develop, for example, an Expert Advisor based on Fibo levels, then what prevents us from once and for all creating a function that will calculate all other prices based on two known ones and store them in an array. In this case, the Expert Advisor can be tested and optimized, instead of running it through the visualizer, which of course is necessary... And if you always know only two prices - the upper and lower anchor points, you always know prices of all levels - of both standard fib and your own...

Yeah. But what if it's some kind of indicator that draws and the algorithm is unknown?

 
Vasyl Nosal:

Yeah. What if it's some kind of indicator that draws and the algorithm is unknown?

This is nonsense, you were right above, besides if you are writing an algorithm that has Fibo levels on the chart, how will it be unknown to you?
 
Vasyl Nosal:

Yeah. What if it's some kind of indicator that draws and the algorithm is unknown?

Then you only need to know two prices - the anchor points. And then your function I told you about will tell you everything.
 
Vasyl Nosal:

I asked if there's a built-in object get for that (there isn't, but there should be).

And this is a real tambourine dance.

A little simpler way is possible without wayUP

string name_fibo="Fibo";
//////////////
void OnStart()
{
  double price_lev0=ObjectGetDouble(0, name_fibo, OBJPROP_PRICE,1);
  double price_lev100=ObjectGetDouble(0, name_fibo, OBJPROP_PRICE,0);

  int levels=int(ObjectGetInteger(0, name_fibo, OBJPROP_LEVELS));
  double fib_prices[]; ArrayResize(fib_prices, levels);
  for(int i=0;i<levels;i++)
    fib_prices[i]=price_lev0+(price_lev100-price_lev0)*ObjectGetDouble(0, name_fibo, OBJPROP_LEVELVALUE, i);
}

But that's really the only way.

And this is not tambourine dancing, but implementation of correct approach, that information should be synchronized minimum.

PS

And you can calculate price of ANY level you need. // For example the price of level 37%

string name_fibo="Fibo";
//////////////
void OnStart()
{
  double price_lev0=ObjectGetDouble(0, name_fibo, OBJPROP_PRICE,1);
  double price_lev100=ObjectGetDouble(0, name_fibo, OBJPROP_PRICE,0);

  double lvl37=price_lev0+(price_lev100-price_lev0)*0.37;
}
 
coderex:
This is nonsense, you were correctly written above, besides if you are writing an algorithm that has Fibo levels on a chart, how will it be unknown to you.
I'm not going to give up? Alien compiled indicator.
 
o_O:

a little easier you can do it without wayUP

But this is really the only way.

And it's not a tambourine dance, it's the implementation of the right approach, that the information should synchronise as little as possible.

PS

And you yourself can calculate price of ANY level you need. // For example the price of 37% level.

Compared to one line ofObjectGetDouble(0, name_fibo, OBJPROP_PRICE,0.26);

it's even worse than dancing.

 
Vasyl Nosal:

Compared to one lineObjectGetDouble(0, name_fibo, OBJPROP_PRICE,0.26);

this is even worse than dancing.

understand the developers. there are anchor points and there is a visual result.

Only the anchor points are guaranteed to be known to you - by pure chance, you call them 0% and 100%.
everything else is a visual result that the Metac Model cannot provide in the way you want.

It's not dancing and tambourine - it's ideology.

Play with the cards you have.

 
o_O:

understand the developers. there are anchor points and there is a visual result.

you are only guaranteed to know the anchor points - by pure chance you call them 0% and 100%.
All the rest is a visual result that the meta-object model can not provide you in the form you want.

It's not dancing and tambourine - it's ideology.

Play with the cards you have.

:))) thanks

Can't provide because fibo lines are not objects on a chart?

 
Alexey Klenov:

Good afternoon

There is one broker with mt5.

and there's a CFD on oil

...

I don't know why I have such a tough time with this kind of problem.

I don't know how to fix the server side so that the helpline is not able to configure symbols incorrectly.

With the server side is all right, but the office in which you are trading - no. It is up to the drowning man to save the drowning man. The only place where it is absolutely transparent and safe to trade derivatives, including oil, is the Moscow Stock Exchange. Trade the February contract BR-2.16 through MetaTrader 5. Its liquidity will make you happy.
 
Vasyl Nosal:

:))) thank you

Can't provide because fibo lines are not objects on a chart?

It can not, because this object is a Fibo line for you and only two anchor points and some algorithm of their processing for the terminal

---

You would look at other more complex objects like a spiral or a gannet. Well a metac can't give you everything you want.

Because there are only anchor points. Everything else is a picture.

Reason: