How to Detect & Get Price value of a specific Fibo Level

 

I've been using this code for Detecting & Getting price value of a Horizontal Line :

for(int x=0; x<ObjectsTotal(0,-1,-1); x++)
  {
   string objn = ObjectName(0,x,-1,-1);
   long Obj_HType;
   ObjectGetInteger(0,objn,OBJPROP_TYPE,0,Obj_HType);
   if(Obj_HType == OBJ_HLINE)
     {  
       double XD;
       
       ObjectGetDouble(0,objn, OBJPROP_PRICE,0,XD);
     
     }
  }

And fibo is a single Object not many Horizontal Lines. So, Its not possible to get the price of a fibo level by this code.

I tried many ways to get this But I've found nothing in Documentation & Forums.

So, Please if you have any Idea that can help me you're Welcome to Share :)


Thanks in advance all of you !!

 
Hi Koshalya ! Can you reply to my message about the EA not loading Up ?
 
Koshalya:

I've been using this code for Detecting & Getting price value of a Horizontal Line :

And fibo is a single Object not many Horizontal Lines. So, Its not possible to get the price of a fibo level by this code.

I tried many ways to get this But I've found nothing in Documentation & Forums.

So, Please if you have any Idea that can help me you're Welcome to Share :)


Thanks in advance all of you !!

Example: You know that from 0.0% to 100.0% the difference is +82.675 and you want to calculate the difference between 0.0% and 161.8%.

You must calculate ((+82.675/100)*161.8).

Good thing is that the fibonacci numbers are already relations of distances of the lines. Now you only need to get the price values of the anchor points with ObjectGetDouble and OBJPROP_PRICE.

I wonder if it would be even easier with OBJPROP_LEVELVALUE or OBJECTPROP_SCALE.

Reason: