n.bhaskar1993

MACD Overlay

MACD Overlay indicator plots the MACD directly on price. This helps you better understand the MACD indicator and filter the false signals.
Remove from Favorite Scripts Add to Favorite Scripts
Hello,
Im wondering what would be the ideal period setting for 2m or 5m trades for the MACD indicator?
Reply
amazing
how can i set this setting i don't know to about set code
please help to set this
Reply
n.bhaskar1993 Riteish021
@Riteish021, If you are refering to MACD code in the above comment, just copy and paste it in blank indicator script, save it and your indicator is ready.
Reply
yes sir
Reply
n.bhaskar1993 Kumaran1964
@Kumaran1964, This is the code for MACD Indicator:

//@version=2
study("MACD")
src=input(close, title="Field")
s=input(26, minval=1, title="Slow")
f=input(12, minval=1, title="Fast")
si=input(9, minval=1, title="Signal")

fast=ema(src, f)
slow=ema(src, s)

macd=fast-slow
signal=sma(macd, si)
hist=macd-signal

pos_hist=max(0, hist)
neg_hist=min(0, hist)

plot(pos_hist, color=pos_hist>pos_hist?green:red, style=histogram, linewidth=3, title="Positive Histogram")
plot(neg_hist, color=neg_hist>neg_hist?green:red, style=histogram, linewidth=3, title="Negative Histogram")
p1=plot(macd, color=macd>macd?green:red, style=line, linewidth=2, title="MACD")
p2=plot(signal, color=signal>signal?green:red, style=line, linewidth=2, title="Signal")
fill(p1, p2, color=macd>signal ? green:red, title="FILL", transp=50)

ma_len=input(89, title="SMA")
ma=sma(macd, ma_len)

plot(ma, title="SMA", color=ma>ma?green:red, style=line, linewidth=1)
Reply
Kumaran1964 n.bhaskar1993
@n.bhaskar1993,


thanks a ton sir
Reply
how do i get the macd below the charts
Reply
n.bhaskar1993 Kumaran1964
@Kumaran1964, Are you refering to the MACD indicator?
Reply
thk u boss
Reply
n.bhaskar1993 Kumaran1964
@Kumaran1964, You are welcome.
Reply
EN English (IN)
EN English
EN English (UK)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
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