LazyBear

Mirrored MACD [LazyBear]

This is a famous indicator I have seen used by many Forex traders in MT4 platform. This indicator uses the difference between EMA of "close" and EMA of "open" to form the oscillator lines (not just a convergence/divergence calculation between EMA of "close")

Current market state is determined by which histogram is above zero line. For more confirmation, wait for it to cross above Signal line too. Crossing down the signal or zeroline should be the exit condition. Also, look for divergences.

Use plot labels BullHisto/BearHisto/BearLine/BullLine/ZeroLine/Signal for setting up alerts.

Complete list of my indicators:
-----------------------------
docs.google.com...ByMEvm5MLo/edit?usp=sharin...

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
//
// @author lazybear 
// list of all my indicators: 
// https://docs.google.com/document/d/15agcufjz8ciuvwfj9w-ikns88gkwokbcvbymevm5mlo/edit?usp=sharing
//
study("Mirrored MACD [LazyBear]", shorttitle="MIRRMACD_LB")
length=input(20), siglength=input(9)
colorBars=input(false, title="Color bars?")
ma(s,l) => ema(s,l)
mao=ma(open, length), mac =ma(close, length)
mc=mac-mao, mo=mao-mac, signal=sma(mc, siglength)
plot(0, title="ZeroLine", color=gray)

plot(mc, color=green, linewidth=2, style=histogram,title="BullHisto")
plot(mo, color=red, linewidth=2, style=histogram,title="BearHisto")
plot(mo, color=red, linewidth=2,title="BearLine")
plot(mc, color=green, linewidth=2,title="BullLine")
plot(signal, color=blue, linewidth=2,title="Signal")

us=max(mc,mo), bc=us>=signal?(us==mc?lime:maroon):na
barcolor(colorBars?bc:na)