FIBO's issue

 

Hi,

When I want to see wide past time like below picture, my FIBO's disappear.

(I made this FIBO's with Indicator.)

(It looks like 'Chart Scale' issue when Scale 1,3,5... FIBO's disappear - it appear 2,4,6...) 

Fibo disappear  

What a problem please help me, I need good reply.

Thanks. 

 

I can't get right price result.

I try code like below.

string _obj_desc_Price_cdts = DoubleToStr( _obj_desc_Price, _Digits - 2 ); // yes I know price is not 'string' - it maybe 'double' but I know one way how to decrease decimals.
// ...
ObjectSetFiboDescription( _obj_Name + _I, 0 , _obj_desc_Price_cdts ); // Result EURUSD - 0.000

Please help me.

Thanks.

 
Max Enrik:

(It looks like 'Chart Scale' issue when Scale 1,3,5... FIBO's disappear - it appear 2,4,6...) 

      I fixed it.
 

I need your advice can I decrease last two decimal from 'ObjectSetFiboDescription'?

(i.g price 1.13500 - after removed  price 1.135) 

Thanks. 

 
Max Enrik:

I can't get right price result.

I try code like below.

string _obj_desc_Price_cdts = DoubleToStr( _obj_desc_Price, _Digits - 2 ); // yes I know price is not 'string' - it maybe 'double' but I know one way how to decrease decimals.
// ...
ObjectSetFiboDescription( _obj_Name + _I, 0 , _obj_desc_Price_cdts ); // Result EURUSD - 0.000

Please help me.

Thanks.

 

In theory, this should work fine. Please show where you set _obj_desc_Price, _obj_Name and _I

 
honest_knave: 

In theory, this should work fine. Please show where you set _obj_desc_Price, _obj_Name and _I

I set them in 'int start()' function

 

You aren't really showing enough code... I presume you are creating a fibo then running ObjectSetFiboDescription.

What I have found is that if you do that without explicitly setting the number of fibo levels, you will get a 4201 error when you run ObjectSetFiboDescription.

A basic example to illustrate the point. This works:

#property strict

void OnStart()
  {
   string name="MyFibo";
   int h=iHighest(NULL,0,MODE_HIGH,30),
       l=iLowest(NULL,0,MODE_LOW,30);
   ObjectCreate(0,name,OBJ_FIBO,0,Time[h],High[h],Time[l],Low[l]);
   ObjectSetInteger(0,name,OBJPROP_FIBOLEVELS,1);
   ObjectSetFiboDescription(name,0,DoubleToStr(Low[l],2));
  }  

This does not:

#property strict

void OnStart()
  {
   string name="MyFibo";
   int h=iHighest(NULL,0,MODE_HIGH,30),
       l=iLowest(NULL,0,MODE_LOW,30);
   ObjectCreate(0,name,OBJ_FIBO,0,Time[h],High[h],Time[l],Low[l]);
   ObjectSetFiboDescription(name,0,DoubleToStr(Low[l],2));
  }  


 

 
honest_knave:

You aren't really showing enough code... I presume you are creating a fibo then running ObjectSetFiboDescription.

What I have found is that if you do that without explicitly setting the number of fibo levels, you will get a 4201 error when you run ObjectSetFiboDescription.

A basic example to illustrate the point. This works:

Thanks so much for great example.

You will understand me if you visit below link.

Posted 

Thanks your comments. 

Reason: