MFI [seiglerj]

9252 lượt xem
9252 13
Money Flow Index with breach highlighting
based on LazyBear's MFI/RSI script
Phát hành các Ghi chú: Improve colors to work better with a light theme
Fix indicator scaling with invisible lines at 0 and 100
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
Seiglerj, what the difference between your and normal MFI? I can spot some differences, yours often seems to be more "aggressive".
Phản hồi
seiglerj Kalindro
@Kalindro, My MFI formula is the same as the official MFI indicator, which I have pasted here:

study(title="Money Flow", shorttitle="MFI")
length = input(title="Length", type=integer, defval=14, minval=1, maxval=2000)
src = hlc3
upper = sum(volume * (change(src) <= 0 ? 0 : src), length)
lower = sum(volume * (change(src) >= 0 ? 0 : src), length)
mf = rsi(upper, lower)
plot(mf, color=#459915)
overbought=hline(80, title="Overbought", color=#c0c0c0)
oversold=hline(20, title="Oversold", color=#c0c0c0)
fill(overbought, oversold, color=#9915ff, transp=90)

The only new thing mine does is highlight overbought and oversold more effectively.
Phản hồi
Kalindro seiglerj
@seiglerj, Oh, I wonder why they vary (sometimes a lot) on my chart. Upper is the one from you, lower is the built-in.

Clearly oversold on one of them.
Phản hồi
seiglerj Kalindro
@Kalindro, I'm not able to produce this effect on my own charts, but it seems like one of those MFI indicators is based on standard candles and the other one is based on Heikin-Ashi candles. I don't know why changing the candle style is allowed to affect indicators, but it absolutely does. For that reason, I generally use standard candles which have been hidden, and add the Heikin-Ashi indicator named "I_Heikin Ashi Candle". You just have to merge it back up onto the main chart so it can replace the existing candles.
Phản hồi
Hi Seiglej. Thanks for this script. I'm trying to create a bot that incorporates MFI. I can calculate RSI. Is there a fast way to calculate the MFI based on RSI?
Phản hồi
@BullZak, Here is the formula for MFI:

Typical Price = (High + Low + Close)/3

Raw Money Flow = Typical Price x Volume
Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow)

Money Flow Index = 100 - 100/(1 + Money Flow Ratio)

And RSI:

RSI = 100 - --------
1 + RS

RS = Average Gain / Average Loss

These two are not closely related enough to have a straightforward connection. The MFI is sometimes referred to as "volume-weighted RSI" but their formulas are very different.
Phản hồi
Congrats for the variation on the developed indicator seiglerj,

Could you please let me know which means each bar red or green on the indicator? Seems to be pivot points, are these equivolume bars?

Thank you.

Héctor L. Arroyo
Telecommunications Engineer.
Phản hồi
seiglerj ingpro-84
@ingpro-84, MFI is considered overbought when it exceeds the upper boundary of 80 or so, and oversold when it goes below the lower boundary of 20 or so. Whatever you have the boundaries set for, this script highlights overbought conditions with red bars, suggesting that it is time to sell, and highlights oversold conditions with green bars, indicating that it is time to buy. has more information.
Phản hồi
ingpro-84 seiglerj
@seiglerj, Of course seiglerj, I know, I just didn't notice that the bars were only to indicate the change of the condition overbought or oversold, I supposed that were developed to point something additional in conjunction with the basic MFI indicator,

Thank so much you seiglerj for the quick response,

Best Regards,
Phản hồi
Can you please add how to use this check if price is going up/down. I am very new to this indicator.
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Nhận trợ giúp Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Nhận trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất