Support & Resistance with moving averages

Category: Indicators By: Ichimoku Reading Created: November 2, 2020, 10:24 AM
November 2, 2020, 10:24 AM
Indicators
2 Comments

We know that some popular indicators are supportive and resistant.

We have the most widespread moving averages, namely MM20 – MM50 – MM100 – MM200 of Simple Type
Also Ichimoku, this indicator was designed to give levels of support and resistance.

If you apply all these indicators on the same chart, your vision will be distorted by too many lines, especially if you want to add the pivot points .

So I have coded this small indicator that groups together the current levels of all the components mentioned above for more comfort.

You can activate or deactivate a component as an external variable.

IV

 

//
//=/===============/=//=/===============/=//=/ Indicator Support & Resistance
//

defparam drawonlastbaronly = true

//MM20 = 1
//MM50 = 1
//MM100 = 1
//MM200 = 1

//SSA = 1
//SSB = 1
//Tenkansen = 1
//Kijunsen = 1

//
//=/===============/=//=/===============/=//=/ Support Resistance
//

//=/ Support 20
if MM20 then
S20    = average[20](close)
drawtext("========== 20",barindex,S20,Dialog,Bold,10) coloured (RS20,GS20,BS20)
endif

if close > S20 then
RS20 = 102
GS20 = 102
BS20 = 102

elsif close < S20 then
RS20 = 0
GS20 = 153
BS20 = 255

endif

//=/ Support 50
if MM50 then
S50    = average[50](close)
drawtext("========== 50",barindex,S50,Dialog,Bold,10) coloured (RS50,GS50,BS50)
endif

if close > S50 then
RS50 = 102
GS50 = 102
BS50 = 102

elsif close < S50 then
RS50 = 0
GS50 = 153
BS50 = 255

endif

//=/ Support 100
if MM100 then
S100    = average[100](close)
drawtext("  ========== 100",barindex,S100,Dialog,Bold,10) coloured (RS100,GS100,BS100)
endif

if close > S100 then
RS100 = 102
GS100 = 102
BS100 = 102

elsif close < S100 then
RS100 = 0
GS100 = 153
BS100 = 255

endif

//=/ Support 200
if MM200 then
S200    = average[200](close)
drawtext("  ========== 200",barindex,S200,Dialog,Bold,10) coloured (RS200,GS200,BS200)
endif

if close > S200 then
RS200 = 102
GS200 = 102
BS200 = 102

elsif close < S200 then
RS200 = 0
GS200 = 153
BS200 = 255

endif

//=/ SpanA
if SSA then
SpanA = (Tenkan[26]+Kijun[26])/2
drawtext("       ========== SpanA",barindex,SpanA,Dialog,Bold,10) coloured (RSpanA,GSpanA,BSpanA)
endif

if close > SpanA then
RSpanA = 102
GSpanA = 102
BSpanA = 102

elsif close < SpanA then
RSpanA = 0
GSpanA = 153
BSpanA = 255

endif

//=/ Tenkan
if Tenkansen then
Tenkan = (highest[9](high)+lowest[9](low))/2
drawtext("        ========== Tenkan",barindex,Tenkan,Dialog,Bold,10) coloured (RTenkan,GTenkan,BTenkan)
endif

if close > Tenkan then
RTenkan = 102
GTenkan = 102
BTenkan = 102

elsif close < Tenkan then
RTenkan = 0
GTenkan = 153
BTenkan = 255

endif

//=/ Kijun
if Kijunsen then
Kijun = (highest[26](high)+lowest[26](low))/2
drawtext("     ========== Kijun",barindex,Kijun,Dialog,Bold,10) coloured (RKijun,GKijun,BKijun)
endif

if close > Kijun then
RKijun = 102
GKijun = 102
BKijun = 102

elsif close < Kijun then
RKijun = 0
GKijun = 153
BKijun = 255

endif

//=/ SpanB
if SSB then
SpanB = (highest[52](high[26])+lowest[52](low[26]))/2
drawtext("       ========== SpanB",barindex,SpanB,Dialog,Bold,10) coloured (RSpanB,GSpanB,BSpanB)
endif

if close > SpanB then
RSpanB = 102
GSpanB = 102
BSpanB = 102

elsif close < SpanB then
RSpanB = 0
GSpanB = 153
BSpanB = 255

endif

//
//=/===============/=//=/===============/=//=/ End
//

return

Download
Filename: Support-Resistance.itf
Downloads: 442
Ichimoku Reading Master
------------------------------------Participating Encoder-----------------------------------
Author’s Profile

Comments

Logo Logo
Loading...