Madrid Heat Map

517 2 104
This study shows the trend in terms of a heat map using three simple colors, green for an uptrend, red for a downtrend and yellow for a possible reentry or reversal point.
There are two lines, one at the 20 ma and the second at the 50 ma which are the two most popular moving averages references and where there are high possibilities of support/resistance and reversal points.
The upper yellow line stands for the 20 ma, the lower yellow line for the 50 ma.
This study requires no parameters, so it is kept simple and user friendly.
Remove from Favorite Scripts Add to Favorite Scripts
// Madrid : 03/Aug/2015 : Heat Map : 2.0
// This study shows the trend in terms of a heat map.
// Two lines define the limits where a possible reversal can occur.

study("Madrid Heat Map", shorttitle="MHeatMap")
src = close

ma05 = ema(src, 05)
ma10 = ema(src, 10)
ma15 = ema(src, 15)
ma20 = ema(src, 20)
ma25 = ema(src, 25)
ma30 = ema(src, 30)
ma35 = ema(src, 35)
ma40 = ema(src, 40)
ma45 = ema(src, 45)
ma50 = ema(src, 50)
ma55 = ema(src, 55)
ma60 = ema(src, 60)
ma65 = ema(src, 65)
ma70 = ema(src, 70)
ma75 = ema(src, 75)
ma80 = ema(src, 80)
ma85 = ema(src, 85)
ma90 = ema(src, 90)

maPairColor(ma1, ma2) =>
  change(ma1,3)>=0 and change(ma2,3)>=0 ? green :
  change(ma1,3)<=0 and change(ma2,3)<=0 ? red   :
plot(18, style=columns, color=maPairColor(ma05,ma90), histbase=17, editable=false)
plot(17, style=columns, color=maPairColor(ma10,ma90), histbase=16, editable=false)
plot(16, style=columns, color=maPairColor(ma15,ma90), histbase=15, editable=false)
plot(15, style=columns, color=maPairColor(ma20,ma90), histbase=14, editable=false)
plot(14, style=columns, color=maPairColor(ma25,ma90), histbase=13, editable=false)
plot(13, style=columns, color=maPairColor(ma30,ma90), histbase=12, editable=false)
plot(12, style=columns, color=maPairColor(ma35,ma90), histbase=11, editable=false)
plot(11, style=columns, color=maPairColor(ma40,ma90), histbase=10, editable=false)
plot(10, style=columns, color=maPairColor(ma45,ma90), histbase=09, editable=false)
plot(09, style=columns, color=maPairColor(ma50,ma90), histbase=08, editable=false)
plot(08, style=columns, color=maPairColor(ma55,ma90), histbase=07, editable=false)
plot(07, style=columns, color=maPairColor(ma60,ma90), histbase=06, editable=false)
plot(06, style=columns, color=maPairColor(ma65,ma90), histbase=05, editable=false)
plot(05, style=columns, color=maPairColor(ma70,ma90), histbase=04, editable=false)
plot(04, style=columns, color=maPairColor(ma75,ma90), histbase=03, editable=false)

hline(15, color=yellow, linewidth=1, linestyle=dotted)
hline(09, color=yellow, linewidth=1, linestyle=dotted)
Looks good, I'll try it out.
Nice coding.
Madrid PRO IvanLabrie
Thank you.
+1 Reply
United States
United Kingdom
Việt Nam
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out