Fibonacci updates only one price. Please help.

 

Hello everyone,

I hope someone can help me with my problem. Now I want to plot a Fibonacci Extention in my EA based on upper and lower Bollinger Bands. The problem is that Fibonacci is following only one band (one price). The secound price remains the same.

This is the code which causes the problem but I can't find a solution for this.

      ObjectCreate    (chartID501,hLine501,OBJ_FIBO,0,0,ma2_1,0,ma1_1);
      ObjectSet       (hLine501,1,ma1_1);
      ObjectSet       (hLine501,1,ma2_1);

Here is also a picture: 

 

Thanks in advance. 

 

You're setting the same property index both times: 

      ObjectCreate    (chartID501,hLine501,OBJ_FIBO,0,0,ma2_1,0,ma1_1);
      ObjectSet       (hLine501,OBJPROP_PRICE1,ma1_1);
      ObjectSet       (hLine501,OBJPROP_PRICE2,ma2_1);
 
honest_knave:

You're setting the same property index both times: 

Oh, how embarrassing. Thank you very much! :)

Have a nice day

Reason: