MQL5 / MT5 / Fibonacci Levels & Different Colors?

To add comments, please log in or register
FxTrader2468
5
FxTrader2468  

Hi All


I'm new to this MQL5 Community and this is my first time writing in. 

I wanted to know if there is a way to assign individual colors to each Fibonacci Level. For example: 50% Level = BLue; 61.8% = Red; -23.6% = Green and so on? I don't think the default settings allow you to customize the levels individually. 

I know someone wrote MQL4 code in the past that allows one to choose the color for each level but I'd imagine this is not compatible with the MT5 platform. If anyone has any idea or knows of something that is available to fulfill this task, please let me know. 

Apologies for being very vague. I am not a coder so I wouldn't know where to start. 

Appreciate your time and look forward to any replies.


Many thanks.

kypa
983
kypa  
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]);

https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_fibo

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_FIBO
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_FIBO
  • www.mql5.com
//| Create Fibonacci Retracement by the given coordinates            |               time1=0,                            price1=0,                         time2=0,                            price2=0,                        width=1,            //
To add comments, please log in or register