how to add new fibo retracement level

 

Hello,

i've correctly created a fibo retracement tool with these instructions :

#include <ChartObjects\ChartObjectsFibo.mqh>
CChartObjectFibo myFibo;
//....

int OnCalculate(
//....
 
myFibo.Create(0,"myFibo",0,t1, p1,t2, p2);

//....
}


Now i want to add a new 0.1 retracement level in it.But this instruction dont work :

 int level = 1;
 double new_value = 0.1;
   
 myFibo.LevelValue(level, new_value);

 


Can you explain which intrctions will add it in myFibo.

Thanks

 

ok i found how to do

double levels[7] = { 0.0, 0.1, 0.2, 0.5, 0.7, 0.9, 1.0};
myFibo.LevelsCount(7);   
for(int i = 0;i < ArraySize(levels); i++){
    myFibo.LevelValue(i, levels[i]);
    myFibo.LevelDescription(i, DoubleToStr(levels[i]*100, 1));
}