2 Color MACD Histogram

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

2 Color MACD Histogram

Postby Jerry77 » Thu Dec 03, 2009 1:06 am

Is there a way to customize the MACD to indicate if the current bar is larger or smaller than the previous bar. For example, if the current bar is larger it will be green, if smaller then red. :?:
Jerry77
FXCodeBase: Confirmed User
 
Posts: 8
Joined: Thu Dec 03, 2009 1:00 am

Re: 2 Color MACD Histogram

Postby TonyMod » Fri Dec 11, 2009 5:28 pm

Jerry77 wrote:Is there a way to customize the MACD to indicate if the current bar is larger or smaller than the previous bar. For example, if the current bar is larger it will be green, if smaller then red. :?:


Sorry for late response. Yeah i think this is something that can be done. Can you specify which bars you want to compare, bars that MACD Oscillator show or original bars on the chart. If you mean bars on the chart, then could you just specify which measurement you mean? Should size of the bar be calculated as distance between high-low or open-close?

I'm just asking to clarify before i forward your request to developers.

Thanks,

TonyMod
Best Regards,

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Re: 2 Color MACD Histogram

Postby arunaa » Tue Dec 15, 2009 1:32 pm

Yeah that would be useful..If the MACD is rising then each successive bar should be coloured green and if its falling then it should be red..The reverse would be true below the zero line..Same below the zero lin too..That should help viualization ..Can you code that new MACD ..
arunaa
FXCodeBase: Confirmed User
 
Posts: 19
Joined: Tue Dec 15, 2009 1:27 pm

Re: 2 Color MACD Histogram

Postby arunaa » Tue Dec 15, 2009 1:36 pm

Yeah that would help..Compare it with the MACD bars...Each successively increasing MACD chart should be green in color and each successively reducing(lower value than the previouys bar) should be red in color..Can you code that.. that would help visualization..
arunaa
FXCodeBase: Confirmed User
 
Posts: 19
Joined: Tue Dec 15, 2009 1:27 pm

Re: 2 Color MACD Histogram

Postby arunaa » Tue Dec 15, 2009 1:56 pm

Yes. that would be useful..it should be colored base on MACD hart.. If MACD is rising then each successive MACD bar should be green in color and if it is falling then each successive bar should be red in color..
arunaa
FXCodeBase: Confirmed User
 
Posts: 19
Joined: Tue Dec 15, 2009 1:27 pm

Re: 2 Color MACD Histogram

Postby Jerry77 » Tue Dec 15, 2009 8:53 pm

I would like to have a histogram that compares the current histogram bar against the previous bar.

If current bar is > greater than previous bar then current color of histogram is green, else the color is red.

It would show an up trending histogram in green and a down trending histogram in red.
It just easier to eyeball this indicator instead of having to go view the data bar by bar.
Jerry77
FXCodeBase: Confirmed User
 
Posts: 8
Joined: Thu Dec 03, 2009 1:00 am

Re: 2 Color MACD Histogram

Postby admin » Wed Dec 16, 2009 8:41 am

Yes, it is possible. You can create two output streams instead of one. The first output stream in red, and the second in green. And then put ascending bars to the green stream and descending to the red stream. You can see an example in A/D indicator

I hope this helps.
admin
FXCodeBase: Site Admin
 
Posts: 20
Joined: Tue Oct 20, 2009 10:02 am
Location: Paramus, NJ

Re: 2 Color MACD Histogram

Postby arunaa » Wed Dec 16, 2009 1:18 pm

HI,
Yes but I dont know how to code it..Can you post the code just as in the A/C indicator and we can copy the lua file as is to get the 2 color MACD indicator..
arunaa
FXCodeBase: Confirmed User
 
Posts: 19
Joined: Tue Dec 15, 2009 1:27 pm

Re: 2 Color MACD Histogram

Postby TonyMod » Wed Dec 16, 2009 4:01 pm

arunaa wrote:HI,
Yes but I dont know how to code it..Can you post the code just as in the A/C indicator and we can copy the lua file as is to get the 2 color MACD indicator..


Yeah guys, i think we can do that, give us little time and i'll post it once its ready.

Cheers,

TonyMod
Best Regards,

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Re: 2 Color MACD Histogram

Postby TonyMod » Tue Dec 22, 2009 3:44 pm

Jerry77 wrote:I would like to have a histogram that compares the current histogram bar against the previous bar.

If current bar is > greater than previous bar then current color of histogram is green, else the color is red.

It would show an up trending histogram in green and a down trending histogram in red.
It just easier to eyeball this indicator instead of having to go view the data bar by bar.


arunaa wrote:HI,
Yes but I dont know how to code it..Can you post the code just as in the A/C indicator and we can copy the lua file as is to get the 2 color MACD indicator..


As requested here it is. I've tested and seems to work same way you requested.

Moving Average Convergence/Divergence (MACD)

MACD1.gif
MACD + Coloring Screenshot


MACD1.lua
DOWNLOAD THIS INDICATOR
(5.15 KiB) Downloaded 1879 times


Let me know if it needs any adjustment, users' input is very valuable.

Cheers,

TonyMod
Best Regards,

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Next

Return to Discussions

Who is online

Users browsing this forum: No registered users and 12 guests