Download MetaTrader 5
To add comments, please log in or register
Deposit to your account using bank cards via Gate2Shop
Kenny
13
Kenny 2015.12.19 17:15 

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. 

honest_knave
954
honest_knave 2015.12.19 18:14  

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);
Kenny
13
Kenny 2015.12.19 23:01  
honest_knave:

You're setting the same property index both times: 

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

Have a nice day

/
To add comments, please log in or register