OPEN-SOURCE SCRIPT

Bộ lọc Stoch RSI + MACD + Volume + MFI

90
//version=6
indicator("Bộ lọc Stoch RSI + MACD + Volume + MFI", overlay=false)

// Input
lenStoch = input.int(14, "Stoch RSI Length")
lenMACD = input.int(12, "MACD Fast Length")
lenSignal = input.int(9, "MACD Signal Length")
lenMFI = input.int(14, "MFI Length")
minVol = input.int(1000000, "Khối lượng tối thiểu")

// Stochastic RSI
k = ta.stoch(close, high, low, lenStoch)
d = ta.sma(k, 3)

// MACD
macd = ta.ema(close, lenMACD) - ta.ema(close, 26)
signal = ta.ema(macd, lenSignal)

// ✅ MFI (chỉ cần volume và length)
mfi = ta.mfi(volume, lenMFI)

// Điều kiện lọc
buyCond = (k < 20 and macd > signal and volume > minVol and mfi > 60)
sellCond = (k > 80 and macd < signal and mfi < 40)

// Xuất tín hiệu
plotchar(buyCond, "BUY", "▲", location=location.bottom, color=color.green, size=size.large)
plotchar(sellCond, "SELL", "▼", location=location.top, color=color.red, size=size.large)

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.