Simple example of how to paint a bar (indicator)

 

Can anybody post a code example of an indicator that paint bars, like Metatrade does?

If Close(i+1)>Close(i) blue bars

If Close(i+1)<Close(i) red bars

Thanks

 
gcardo:

Can anybody post a code example of an indicator that paint bars, like Metatrade does?

If Close(i+1)>Close(i) blue bars

If Close(i+1)<Close(i) red bars

Thanks


Why not

If Open(i)>Close(i) blue bars

If Open(i)<Close(i) red bars

And do you really think it is needed that anybody post a code example of an indicator that paint bars, like Metatrade does?

You say it yourself like Metatrade does......

Use Properties F8

 

It can be any logic, it was just an example.

I would like to write an indicator that paints the bars if Open(i)>Close(i) (blue) or Open(i)<Close(i) (red)

Thanks

 

Your Example....

 

Sorry for my poor english. I am not expressing myself clearlly

what i want to do is create an INDICATOR that paints bars when RSI(100)>50 blue or RSI(100)<50 red

Thanks

 
Try out Heiken Ashi https://www.mql5.com/en/code/7835
 
Thank you
Reason: