Pls help me just enough to highlight my chart in 2 colours when a condition as simple as ma1>ma2 and ma1<ma2 is fulfilled.

perhaps now you can get what I am saying. This EA places pending order at every MA crossing so it looks like the first image during backtesting. But i want it to get colored at these crossings as shown in second image.
Same here.
I am also not into these chart operations.
but I'll look into this ChartObjectCreate() .
Thanks.
perhaps now you can get what I am saying. This EA places pending order at every MA crossing so it looks like the first image during backtesting. But i want it to get colored at these crossings as shown in second image.
OK.
I am not so deep into ChartDraw(), but it looks like a rectangle that has been drawn with some alpha value for transparency.
You are (I suppose) looking for something like this:
https://www.mql5.com/de/docs/objects/objectcreate
Regards

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I know this language just enough to code EA based on given indicators and condition, and nothing about coding indicators or scripts.
So i was studying few of my backtests to find few logical errors. and it would be helpful if my chart was highlighted in red or green when conditions ma1>ma2 and ma1<ma2 are fulfilled.
Pls help me by giving a few lines to add to my EA which may highlight my chart according to the given conditions.