0

How can I set background color per tick like following by MQL4?
I couldn't find in documentation.
https://mt4trader.net/wp-content/uploads/2015-08-17_hikinashibg.jpg

naohide_a
  • 1,116
  • 2
  • 13
  • 30
  • 1
    I think you have to draw many rectangles in such a case with `PRICE_1` = 0 and `PRICE_2` = (some large value or `INT_MAX`) and update the latest rectangle at least once per bar – Daniel Kniaz Mar 18 '19 at 09:02
  • @DanielKniaz Thank you. I think this is the answer. I'll try to do this! – naohide_a Mar 19 '19 at 02:54

1 Answers1

0

I use array of colors and a static variable in the OnTick function to pick new color upon every call for the function. the same logic can be used for any function you'll define outside the OnTick function. A static variable will enable you to keep a value of the index of the used color from the array in the function after execution.

Ardent Coder
  • 3,777
  • 9
  • 27
  • 53
Ramzy
  • 171
  • 2
  • 14