Repainting bars based on Open/Close

Moderator: moderators

Jojamie
rank: <50 posts
rank: <50 posts
Posts: 3
Joined: Mon Oct 06, 2008 11:28 pm
Reputation: 0
Gender: None specified

Repainting bars based on Open/Close

Postby Jojamie » Fri Oct 31, 2008 6:34 pm

Hi,

I am having a hell of a time trying to understand the MT4 code...I am far from being a coder :)

Does anyone have the code to paint a bar say RED when the open is in the top 33% of the bar and the close is in the bottom 33% of the bar, and paint it GREEN if the opposite is true?

I know this is possible in TS, however I use Metatrader. I believe its called paintbars.

Worst case, does anyone know how to place an UP/DOWN arrow below any bar exhibiting the above behaviour rather than repainting it?

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Oct 31, 2008 10:14 pm

TRO_Multi_Meter_OneThird_OC


Image

TRO_Multi_Meter_OneThird_OC displays the 1/3 bar status for all of the time frames.

The colors are inputs. I used blue instead of green.

MT4 version of TRO_Multi_Meter_OneThird_OC attached.
Attachments
TRO_Multi_Meter_OneThird_OC.zip
(12.26 KiB) Downloaded 25 times
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!

Please do NOT PM me with trading or coding questions, post them in a thread.

Jojamie
rank: <50 posts
rank: <50 posts
Posts: 3
Joined: Mon Oct 06, 2008 11:28 pm
Reputation: 0
Gender: None specified

Postby Jojamie » Sat Nov 01, 2008 5:44 pm

Thanks for doing that TRO :)

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sat Nov 01, 2008 7:32 pm

Image

Here's the indicator to "paint" the bars.

I included a barsgray template. Make sure you install that template and use it before you load the TRO_ONETHIRDOC indicator to paint the bars.
Attachments
TRO_Multi_Meter_OneThird_OC.zip
(16 KiB) Downloaded 19 times
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “MetaTrader”