Range Filter làm gì
Range Filter là chỉ báo miễn phí của DinexSpace cho MT5 và TradingView. Đường lọc chỉ dịch chuyển khi giá đóng cửa thoát khỏi biên độ. Bản có tín hiệu (v2) thêm mũi tên Mua/Bán trên nến đã đóng, kèm mức SL và TP gợi ý.
Cần bật JavaScript để xem biểu đồ.
Biểu đồ dùng thư viện Lightweight Charts™ của TradingView (giấy phép Apache-2.0). tradingview.com
Nến, đường chỉ báo và mũi tên trong khung trên lấy từ chính bản MT5 chạy trong Strategy Tester; trang web không tính lại gì. Bấm ▶ để phát từng nến, rê chuột vào mũi tên để xem lý do, giá, SL, TP.
Đường lọc chỉ dịch chuyển khi giá đóng cửa ra khỏi một biên độ đã làm mượt quanh nó, nhờ vậy bỏ qua dao động nhỏ.
Khi nào dùng
Dùng để bỏ qua dao động nhỏ và giữ hướng chính.
Chức năng và chế độ
Đường lọc chỉ dịch chuyển khi giá đóng cửa ra khỏi một biên độ đã làm mượt quanh nó, nhờ vậy bỏ qua dao động nhỏ.
Thông số
Range Filter có 50 thông số ở bản MT5 và 24 thông số ở bản TradingView; mọi thông số và giá trị mặc định có trong bảng dưới.
| Nhóm | Tham số | Mặc định | Ý nghĩa |
|---|---|---|---|
| Range Filter | InpPeriod | 100 | Chu kỳ biên độ N |
| Range Filter | InpMultiplier | 3.0 | Hệ số biên độ |
| Range Filter | InpShowBands | true | Hiện dải trên và dưới |
| Signals | InpSigArrows | true | Vẽ mũi tên Mua/Bán (chỉ trên nến đã đóng) |
| Signals | InpSigLabels | true | Nhãn ngắn ghi lý do cạnh mũi tên |
| Signals | InpSigLevels | false | Vẽ đường vào lệnh / SL / TP cho mỗi tín hiệu |
| Signals | InpSigSLATR | 1.5 | SL gợi ý = ATR × hệ số này |
| Signals | InpSigRR | 2.0 | TP gợi ý = khoảng SL × hệ số này (tỷ lệ R:R) |
| Signals | InpSigATRLen | 14 | Chu kỳ ATR (cho SL/TP và bộ lọc biến động) |
| Signals | InpSigLevelBars | 10 | Độ dài đường vào lệnh/SL/TP, số nến |
| Signals | InpSigObjBars | 1500 | Chỉ vẽ nhãn và đường cho tín hiệu trong N nến gần nhất |
| Confluence (score x/7, a signal shows when score >= minimum) | InpConfMin | 4 | Điểm hợp lưu tối thiểu 0–7 để hiện tín hiệu (0 = mọi tín hiệu gốc) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfMTF | true | Yếu tố 1, xu hướng: giá đóng trên (Mua) / dưới (Bán) EMA của khung xu hướng |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfMTFTF | PERIOD_H4 | Khung xu hướng (chỉ dùng nến đã đóng) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfMTFLen | 200 | Chu kỳ EMA xu hướng |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfMom | true | Yếu tố 2, động lượng: RSI(14) trên 50 (Mua) / dưới 50 (Bán) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfVolat | true | Yếu tố 3, biến động: phân vị ATR trong 100 nến nằm giữa 20 và 90 |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfRVol | true | Yếu tố 4, khối lượng: tick volume ≥ trung bình cùng giờ 20 ngày |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfSession | true | Yếu tố 5, phiên: nến tín hiệu nằm trong giờ phiên (giờ máy chủ) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfHourFrom | 7 | Giờ bắt đầu phiên (0–23) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfHourTo | 21 | Giờ kết thúc phiên (0–23, không tính giờ này; có thể vắt qua nửa đêm) |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfNews | true | Yếu tố 6, tin tức: không có tin quan trọng trong lịch MT5 quanh nến tín hiệu |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfNewsMin | 30 | Khoảng quanh tin, số phút trước và sau |
| Confluence (score x/7, a signal shows when score >= minimum) | InpCfSpread | true | Yếu tố 7, spread: spread ≤ 1,5 × trung vị spread 100 nến |
| Confluence (score x/7, a signal shows when score >= minimum) | InpFltGapBars | 0 | Khoảng cách tối thiểu giữa 2 tín hiệu, số nến (0 = tắt) |
| Win rate (history of the signal's group) | InpMinWin | 51 | Tô đậm tín hiệu có tỷ lệ thắng của nhóm từ mức này (%) |
| Win rate (history of the signal's group) | InpHideWeak | false | Ẩn tín hiệu dưới mức đó (tắt = vẽ mờ) |
| Win rate (history of the signal's group) | InpShowBE | false | Bảng góc: hiện tỷ lệ hoà vốn của R:R đang dùng |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbMode | DNX_ODDS_BOTH | % trên nến: cả 2 phía / chỉ phía mạnh hơn / tắt |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbBars | 150 | Số nến có % (0 = mọi nến, chậm hơn) |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbSLATR | 1.5 | % trên nến: SL = TP = ATR × hệ số này |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbRR | 1.0 | % trên nến: TP = khoảng SL × hệ số này |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbD1 | -5 | Màu: đỏ khi thấp hơn hoà vốn + mức này (điểm %) |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbD2 | 0 | Màu: cam khi thấp hơn hoà vốn + mức này |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbD3 | 5 | Màu: vàng khi thấp hơn hoà vốn + mức này |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbD4 | 10 | Màu: xanh lá khi thấp hơn hoà vốn + mức này, trên mức này dùng màu nến tăng của biểu đồ |
| Bar odds (every closed bar as a hypothetical trade, design-period history) | InpPbFont | 7 | Cỡ chữ % trên nến |
| Alerts (once per closed signal bar) | InpAlPopup | false | Cảnh báo popup |
| Alerts (once per closed signal bar) | InpAlPush | false | Thông báo đẩy về điện thoại (Tools → Options → Notifications) |
| Alerts (once per closed signal bar) | InpAlMail | false | Email (Tools → Options → Email) |
| Alerts (once per closed signal bar) | InpAlSound | false | Âm thanh |
| Alerts (once per closed signal bar) | InpAlSoundFile | "alert.wav" | File âm thanh (thư mục Sounds của MT5) |
| Panel | InpPanel | true | Hiện bảng tín hiệu gần nhất |
| Panel | InpPanelCorner | CORNER_LEFT_UPPER | Góc đặt bảng |
| Panel | InpPanelX | 10 | Lệch ngang của bảng, px |
| Panel | InpPanelY | 25 | Lệch dọc của bảng, px |
| Panel | InpPanelFont | 9 | Cỡ chữ bảng |
Tín hiệu
Range Filter cho tín hiệu Mua khi nến vừa đóng đẩy đường lọc đi lên sau một đoạn đi xuống (nhãn "RF turned up") và tín hiệu Bán khi nến vừa đóng đẩy đường lọc đi xuống sau một đoạn đi lên (nhãn "RF turned down"). Chỉ báo không vẽ lại: tín hiệu chỉ được xác nhận khi nến đóng.
- Mua ▲: nến vừa đóng đẩy đường lọc đi lên sau một đoạn đi xuống (nhãn "RF turned up").
- Bán ▼: nến vừa đóng đẩy đường lọc đi xuống sau một đoạn đi lên (nhãn "RF turned down").
- Chỉ khi nến đã đóng. Nến đang chạy không bao giờ có mũi tên, nên tín hiệu đã vẽ không đổi và không mất (không vẽ lại).
- Mũi tên đặt ở nến tín hiệu. Nếu vào lệnh theo tín hiệu thì vào ở giá mở của nến kế tiếp.
- Kèm nhãn ngắn ghi lý do. Có thể bật đường giá vào (giá đóng nến tín hiệu), SL gợi ý (ATR(14) × 1,5) và TP gợi ý (R:R 1:2).
- Hợp lưu: mỗi tín hiệu được chấm 0–7 điểm (xu hướng khung lớn, động lượng, biến động, khối lượng, phiên, tin tức, spread); mặc định chỉ hiện tín hiệu đạt từ 4/7 (bản MT5).
- % trên từng nến (bản MT5): ▲ % Mua dưới nến, ▼ % Bán trên nến, mỗi nến coi như một lệnh giả định R:R 1:1, màu theo mức hoà vốn đã gồm spread; chỉ có số cho XAUUSD H1 với tham số mặc định, nơi khác hiện "–".
- Cảnh báo MT5 (popup, push, email, âm thanh; mỗi loại bật riêng) chỉ báo 1 lần cho mỗi nến tín hiệu. Bản Pine có alertcondition cho Mua và cho Bán.
- Bảng nhỏ ở góc biểu đồ: tín hiệu gần nhất, giá, SL, TP, thời gian, số nến từ lúc có tín hiệu.
SL gợi ý = ATR(14) × 1,5, TP gợi ý = 2 lần khoảng SL (R:R 1:2). Bộ lọc xu hướng, biến động, phiên và khoảng cách giữa tín hiệu đều tắt theo mặc định.
Cảnh báo
Có. Range Filter có cảnh báo sẵn: MT5 – cửa sổ báo, thông báo đẩy, email, âm thanh; TradingView – điều kiện cảnh báo dùng trong Create Alert.
Buffer cho EA
Có. Bản MT5 của Range Filter đưa các đường vẽ ra buffer để EA đọc bằng iCustom và CopyBuffer: Filter, Upper band, Lower band, Buy, Sell, Signal SL, Signal TP, Signal entry, Signal filter, Confluence score, Win rate %, Sample size, Bar buy odds %, Bar buy samples, Bar sell odds %, Bar sell samples, Lean, Bar buy score, Bar sell score.
| Buffer | Nội dung |
|---|---|
| 0 | Mua: khác EMPTY_VALUE = có tín hiệu Mua ở nến đó (giá trị là vị trí vẽ mũi tên) |
| 1 | Bán: khác EMPTY_VALUE = có tín hiệu Bán ở nến đó |
| 2 | SL gợi ý (giá) |
| 3 | TP gợi ý (giá) |
| 4 | Giá vào: giá đóng của nến tín hiệu |
| 5 | Lọc: 1 = không vào lệnh / dừng giao dịch, 0 = được phép |
| 6 | Điểm hợp lưu 0–7 ở nến tín hiệu |
| 7 | Tỷ lệ thắng % của nhóm tín hiệu (giai đoạn thiết kế) |
| 8 | Số mẫu của nhóm đó (EMPTY khi dưới 30) |
| 9 / 11 | % Mua / % Bán của nến (lệnh giả định 1:1) |
| 10 / 12 | Số mẫu của % Mua / % Bán |
| 13 | Lean: +1/−1 = chiều của tín hiệu gốc gần nhất |
| 14 / 15 | Điểm hợp lưu của phía Mua / Bán ở nến đó |
| 16 | Đường lọc |
| 17 | Màu (0 lên, 1 xuống) |
| 18 | Dải trên |
| 19 | Dải dưới |
Đọc ở shift 1 (nến vừa đóng) khi có nến mới. Mỗi input group chiếm 1 vị trí tham số trong iCustom; gọi không truyền tham số thì dùng mặc định.
int h = iCustom(_Symbol, _Period, "DinexRangeFilterSig");
double buy[1], sell[1], sl[1], tp[1];
CopyBuffer(h, 0, 1, 1, buy); CopyBuffer(h, 1, 1, 1, sell);
CopyBuffer(h, 2, 1, 1, sl); CopyBuffer(h, 3, 1, 1, tp);
if(buy[0] != EMPTY_VALUE) { /* Mua, SL = sl[0], TP = tp[0] */ }Pine: các plot ẩn Buy signal, Sell signal (1/0), Signal SL, Signal TP, Signal entry (xem ở Data Window, dùng trong strategy hoặc webhook).
Khung thời gian và thị trường
Range Filter chạy trên mọi khung thời gian của biểu đồ. Phần tính toán đọc khung thời gian của biểu đồ hoặc một khung cố định (ví dụ D1 hay khung lớn hơn), như mô tả ở phần Chức năng.
Giới hạn
Range Filter là công cụ phân tích, không phải hệ thống giao dịch. Các giới hạn đã ghi trong tài liệu có ở dưới.
- SL/TP chỉ là gợi ý theo ATR, không xét spread, phí, trượt giá hay tin tức.
Tín hiệu kỹ thuật chưa qua kiểm định đăng ký trước; không phải lời khuyên đầu tư.
Mã Pine Script
Dán toàn bộ đoạn mã này vào Pine Editor trên TradingView.
DinexRangeFilterSig.pine · 1.111 dòng//@version=6
// DinexSpace | Range Filter Signals v2.0 (2026-11-14)
// Filter line that moves only when the close leaves a smoothed range around it. Buy when a confirmed bar turns the
// filter up after a down move, sell when it turns down after an up move. No repaint. Suggested SL = ATR x 1.5, TP = 2R.
// Open source. License: MIT. (c) 2026 DinexSpace
indicator("DinexSpace | Range Filter Signals", shorttitle = "DNX RF", overlay = true, max_labels_count = 500, max_lines_count = 500)
const string DNX_NAME = "Range Filter"
grpI = "Range Filter"
rfLen = input.int(100, "Range period N", minval = 1, group = grpI)
rfMult = input.float(3.0, "Range multiplier", minval = 0.1, step = 0.1, group = grpI)
rfBands = input.bool(true, "Show upper and lower bands", group = grpI)
// ---- DinexSpace signal layer v2.1 (2026-11-17, GII code + GII filter): inputs ----
grpS = "Signals"
sigArrows = input.bool(true, "Buy/sell arrows (closed bars only)", group = grpS)
sigLabels = input.bool(true, "Short reason label next to each arrow", group = grpS)
sigLevels = input.bool(false, "Entry / SL / TP lines for each signal", group = grpS)
sigSlAtr = input.float(1.5, "Suggested SL = ATR x", minval = 0.1, step = 0.1, group = grpS)
sigRR = input.float(2.0, "Suggested TP = SL distance x (reward:risk)", minval = 0.1, step = 0.1, group = grpS)
sigAtrLen = input.int(14, "ATR period (SL/TP and volatility filter)", minval = 1, group = grpS)
sigLvlLen = input.int(10, "Length of the entry/SL/TP lines, bars", minval = 1, group = grpS)
grpF = "Filters (all off by default)"
fltTrend = input.bool(false, "Trend filter: buy only above the EMA, sell only below", group = grpF)
fltTrendLn = input.int(200, "Trend EMA period", minval = 1, group = grpF)
fltTrendTf = input.timeframe("", "Trend EMA timeframe (empty = chart)", group = grpF)
fltAtr = input.bool(false, "Volatility filter: skip signals when ATR is too small", group = grpF)
fltAtrMin = input.float(0.0, "Minimum ATR, in price units", minval = 0, group = grpF)
fltSes = input.bool(false, "Session filter", group = grpF)
fltSesion = input.session("0800-2000", "Session (exchange time zone)", group = grpF)
fltGap = input.int(0, "Minimum bars between two signals (0 = off)", minval = 0, group = grpF)
grpP = "Panel"
pnlShow = input.bool(true, "Show the last-signal panel", group = grpP)
pnlPos = input.string("top_right", "Panel position", options = ["top_left", "top_right", "bottom_left", "bottom_right"], group = grpP)
grpG = "GII (DinexSpace gold index; reference, not validated)"
giiShow = input.bool(true, "GII rows in the panel (gold charts only)", group = grpG)
giiCode = input.string("", "GII code (copy today's code from the DinexSpace GII page)", group = grpG)
giiFilter = input.bool(false, "Keep only signals on the GII side (buy: zone >= +1, sell: zone <= -1)", group = grpG)
giiMaxAge = input.int(4, "GII older than this many days is stale: the filter then ignores it", minval = 1, group = grpG)
// ---- end of signal inputs ----
ema1 = ta.ema(math.abs(close - close[1]), rfLen)
rng = ta.ema(ema1, 2 * rfLen - 1) * rfMult
var float filt = na
var int rfDir = 1
prevF = nz(filt, close)
if na(rng)
filt := close
else
filt := close > prevF ? (close - rng < prevF ? prevF : close - rng) : (close + rng > prevF ? prevF : close + rng)
prevDir = rfDir
rfDir := filt > prevF ? 1 : filt < prevF ? -1 : rfDir
plot(filt, "Filter", rfDir > 0 ? color.new(#1E90FF, 0) : color.new(#FF4500, 0), 2)
plot(rfBands ? filt + rng : na, "Upper band", color.new(color.silver, 30), 1, plot.style_circles)
plot(rfBands ? filt - rng : na, "Lower band", color.new(color.silver, 30), 1, plot.style_circles)
flip = bar_index > 2 * rfLen and rfDir != prevDir
rawBuy = flip and rfDir > 0
rawSell = flip and rfDir < 0
whyBuy ="RF turned up"
whySell ="RF turned down"
// ---- DinexSpace signal layer v2.1 (2026-11-17, GII code + GII filter) ----
// Needs, defined above: rawBuy, rawSell (bool), whyBuy, whySell (string), const string DNX_NAME.
// A signal is kept only on a confirmed (closed) bar, so it is never redrawn. The higher timeframe EMA
// uses the previous closed higher bar (lookahead on + [1]), which does not repaint either.
sigAtr = ta.atr(sigAtrLen)
// Match context.py's ATR14 seed: running mean through bar 13, then Wilder smoothing.
arrowTr = bar_index == 0 ? high - low : math.max(high, close[1]) - math.min(low, close[1])
var float arrowAtr = na
arrowAtr := bar_index < 14 ? (nz(arrowAtr[1]) * bar_index + arrowTr) / (bar_index + 1) : (arrowAtr[1] * 13 + arrowTr) / 14
emaChart = ta.ema(close, fltTrendLn)
emaHtf = request.security(syminfo.tickerid, fltTrendTf, ta.ema(close, fltTrendLn)[1], lookahead = barmerge.lookahead_on)
arrowEmaH4Prev = request.security(syminfo.tickerid, "240", ta.ema(close, 200)[1], lookahead = barmerge.lookahead_on)
arrowEmaH4Current = request.security(syminfo.tickerid, "240", ta.ema(close, 200), lookahead = barmerge.lookahead_off)
// At an H4 boundary the signal bar has closed that H4 bar, so use its finished EMA.
arrowEmaH4 = timeframe.in_seconds() < 14400 and time_close != time_close("240") ? arrowEmaH4Prev : arrowEmaH4Current
DNX_ARROW_ALL = false // true: one rate for every market (context table not better)
// Measured selected-context rate. Pine can check only these three signal inputs:
// sigSlAtr=1.5, sigRR=2.0, sigAtrLen=14; other defaults cannot be verified.
// ATR rank counts strictly lower values among 100 bars including the signal bar.
// Session hour in UTC: the MT5 server of the measurement runs on UTC without DST (gold reopens Sun 23:00 winter / 22:00 summer).
dnxArrowRate(int dir, int offset) =>
float rate = na
int n = na
if sigSlAtr == 1.5 and sigRR == 2.0 and sigAtrLen == 14
string ticker = str.upper(syminfo.ticker)
if str.startswith(ticker, "AUDUSD") and timeframe.period == "D" and dir == 1
rate := 51
n := 49
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "D" and dir == -1
rate := 48
n := 54
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "60" and dir == 1
rate := 47
n := 1099
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "60" and dir == -1
rate := 50
n := 1113
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "240" and dir == 1
rate := 44
n := 299
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "240" and dir == -1
rate := 51
n := 309
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "15" and dir == 1
rate := 50
n := 372
else if str.startswith(ticker, "AUDUSD") and timeframe.period == "15" and dir == -1
rate := 45
n := 379
else if str.startswith(ticker, "AUS200") and timeframe.period == "D" and dir == 1
rate := 56
n := 46
else if str.startswith(ticker, "ASX200") and timeframe.period == "D" and dir == 1
rate := 56
n := 46
else if str.startswith(ticker, "AUS200") and timeframe.period == "D" and dir == -1
rate := 40
n := 60
else if str.startswith(ticker, "ASX200") and timeframe.period == "D" and dir == -1
rate := 40
n := 60
else if str.startswith(ticker, "AUS200") and timeframe.period == "60" and dir == 1
rate := 52
n := 221
else if str.startswith(ticker, "ASX200") and timeframe.period == "60" and dir == 1
rate := 52
n := 221
else if str.startswith(ticker, "AUS200") and timeframe.period == "60" and dir == -1
rate := 49
n := 242
else if str.startswith(ticker, "ASX200") and timeframe.period == "60" and dir == -1
rate := 49
n := 242
else if str.startswith(ticker, "AUS200") and timeframe.period == "240" and dir == 1
rate := 54
n := 110
else if str.startswith(ticker, "ASX200") and timeframe.period == "240" and dir == 1
rate := 54
n := 110
else if str.startswith(ticker, "AUS200") and timeframe.period == "240" and dir == -1
rate := 44
n := 127
else if str.startswith(ticker, "ASX200") and timeframe.period == "240" and dir == -1
rate := 44
n := 127
else if str.startswith(ticker, "AUS200") and timeframe.period == "15" and dir == 1
rate := 51
n := 551
else if str.startswith(ticker, "ASX200") and timeframe.period == "15" and dir == 1
rate := 51
n := 551
else if str.startswith(ticker, "AUS200") and timeframe.period == "15" and dir == -1
rate := 44
n := 568
else if str.startswith(ticker, "ASX200") and timeframe.period == "15" and dir == -1
rate := 44
n := 568
else if str.startswith(ticker, "BNBUSD") and timeframe.period == "D" and dir == 1
rate := 53
n := 32
else if str.startswith(ticker, "BNBUSD") and timeframe.period == "60" and dir == 1
rate := 48
n := 760
else if str.startswith(ticker, "BNBUSD") and timeframe.period == "60" and dir == -1
rate := 44
n := 736
else if str.startswith(ticker, "BNBUSD") and timeframe.period == "240" and dir == 1
rate := 49
n := 201
else if str.startswith(ticker, "BNBUSD") and timeframe.period == "240" and dir == -1
rate := 45
n := 177
else if str.startswith(ticker, "BTCUSD") and timeframe.period == "60" and dir == 1
rate := 57
n := 163
else if str.startswith(ticker, "BTCUSD") and timeframe.period == "60" and dir == -1
rate := 47
n := 161
else if str.startswith(ticker, "BTCUSD") and timeframe.period == "240" and dir == 1
rate := 53
n := 43
else if str.startswith(ticker, "BTCUSD") and timeframe.period == "240" and dir == -1
rate := 58
n := 43
else if str.startswith(ticker, "ETHUSD") and timeframe.period == "60" and dir == 1
rate := 48
n := 176
else if str.startswith(ticker, "ETHUSD") and timeframe.period == "60" and dir == -1
rate := 45
n := 173
else if str.startswith(ticker, "ETHUSD") and timeframe.period == "240" and dir == 1
rate := 54
n := 46
else if str.startswith(ticker, "ETHUSD") and timeframe.period == "240" and dir == -1
rate := 42
n := 45
else if str.startswith(ticker, "EURUSD") and timeframe.period == "D" and dir == 1
rate := 43
n := 55
else if str.startswith(ticker, "EURUSD") and timeframe.period == "D" and dir == -1
rate := 56
n := 60
else if str.startswith(ticker, "EURUSD") and timeframe.period == "60" and dir == 1
rate := 52
n := 1111
else if str.startswith(ticker, "EURUSD") and timeframe.period == "60" and dir == -1
rate := 48
n := 1127
else if str.startswith(ticker, "EURUSD") and timeframe.period == "240" and dir == 1
rate := 46
n := 328
else if str.startswith(ticker, "EURUSD") and timeframe.period == "240" and dir == -1
rate := 48
n := 324
else if str.startswith(ticker, "EURUSD") and timeframe.period == "15" and dir == 1
rate := 52
n := 382
else if str.startswith(ticker, "EURUSD") and timeframe.period == "15" and dir == -1
rate := 35
n := 383
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "D" and dir == 1
rate := 52
n := 53
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "D" and dir == -1
rate := 53
n := 60
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "60" and dir == 1
rate := 50
n := 1115
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "60" and dir == -1
rate := 49
n := 1137
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "240" and dir == 1
rate := 49
n := 307
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "240" and dir == -1
rate := 50
n := 306
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "15" and dir == 1
rate := 46
n := 370
else if str.startswith(ticker, "GBPUSD") and timeframe.period == "15" and dir == -1
rate := 44
n := 371
else if str.startswith(ticker, "NAS100") and timeframe.period == "D" and dir == 1
rate := 58
n := 65
else if str.startswith(ticker, "NAS100") and timeframe.period == "D" and dir == -1
rate := 40
n := 77
else if str.startswith(ticker, "NAS100") and timeframe.period == "60" and dir == 1
rate := 51
n := 656
else if str.startswith(ticker, "NAS100") and timeframe.period == "60" and dir == -1
rate := 45
n := 674
else if str.startswith(ticker, "NAS100") and timeframe.period == "240" and dir == 1
rate := 55
n := 215
else if str.startswith(ticker, "NAS100") and timeframe.period == "240" and dir == -1
rate := 44
n := 224
else if str.startswith(ticker, "NAS100") and timeframe.period == "15" and dir == 1
rate := 49
n := 479
else if str.startswith(ticker, "NAS100") and timeframe.period == "15" and dir == -1
rate := 48
n := 470
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "D" and dir == 1
rate := 55
n := 52
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "D" and dir == -1
rate := 52
n := 57
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "60" and dir == 1
rate := 48
n := 1080
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "60" and dir == -1
rate := 50
n := 1092
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "240" and dir == 1
rate := 47
n := 287
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "240" and dir == -1
rate := 47
n := 292
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "15" and dir == 1
rate := 45
n := 375
else if str.startswith(ticker, "NZDUSD") and timeframe.period == "15" and dir == -1
rate := 37
n := 374
else if str.startswith(ticker, "SOLUSD") and timeframe.period == "60" and dir == 1
rate := 50
n := 173
else if str.startswith(ticker, "SOLUSD") and timeframe.period == "60" and dir == -1
rate := 58
n := 173
else if str.startswith(ticker, "SOLUSD") and timeframe.period == "240" and dir == 1
rate := 51
n := 47
else if str.startswith(ticker, "SOLUSD") and timeframe.period == "240" and dir == -1
rate := 57
n := 40
else if str.startswith(ticker, "USDCAD") and timeframe.period == "D" and dir == 1
rate := 55
n := 59
else if str.startswith(ticker, "USDCAD") and timeframe.period == "D" and dir == -1
rate := 48
n := 50
else if str.startswith(ticker, "USDCAD") and timeframe.period == "60" and dir == 1
rate := 48
n := 1151
else if str.startswith(ticker, "USDCAD") and timeframe.period == "60" and dir == -1
rate := 46
n := 1139
else if str.startswith(ticker, "USDCAD") and timeframe.period == "240" and dir == 1
rate := 50
n := 297
else if str.startswith(ticker, "USDCAD") and timeframe.period == "240" and dir == -1
rate := 48
n := 284
else if str.startswith(ticker, "USDCAD") and timeframe.period == "15" and dir == 1
rate := 41
n := 391
else if str.startswith(ticker, "USDCAD") and timeframe.period == "15" and dir == -1
rate := 39
n := 381
else if str.startswith(ticker, "USDCHF") and timeframe.period == "D" and dir == 1
rate := 48
n := 64
else if str.startswith(ticker, "USDCHF") and timeframe.period == "D" and dir == -1
rate := 53
n := 64
else if str.startswith(ticker, "USDCHF") and timeframe.period == "60" and dir == 1
rate := 49
n := 1099
else if str.startswith(ticker, "USDCHF") and timeframe.period == "60" and dir == -1
rate := 48
n := 1106
else if str.startswith(ticker, "USDCHF") and timeframe.period == "240" and dir == 1
rate := 49
n := 279
else if str.startswith(ticker, "USDCHF") and timeframe.period == "240" and dir == -1
rate := 52
n := 290
else if str.startswith(ticker, "USDCHF") and timeframe.period == "15" and dir == 1
rate := 43
n := 421
else if str.startswith(ticker, "USDCHF") and timeframe.period == "15" and dir == -1
rate := 35
n := 432
else if str.startswith(ticker, "USDJPY") and timeframe.period == "D" and dir == 1
rate := 50
n := 56
else if str.startswith(ticker, "USDJPY") and timeframe.period == "D" and dir == -1
rate := 47
n := 46
else if str.startswith(ticker, "USDJPY") and timeframe.period == "60" and dir == 1
rate := 47
n := 1098
else if str.startswith(ticker, "USDJPY") and timeframe.period == "60" and dir == -1
rate := 48
n := 1134
else if str.startswith(ticker, "USDJPY") and timeframe.period == "240" and dir == 1
rate := 56
n := 302
else if str.startswith(ticker, "USDJPY") and timeframe.period == "240" and dir == -1
rate := 48
n := 307
else if str.startswith(ticker, "USDJPY") and timeframe.period == "15" and dir == 1
rate := 46
n := 378
else if str.startswith(ticker, "USDJPY") and timeframe.period == "15" and dir == -1
rate := 42
n := 378
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "D" and dir == 1
rate := 61
n := 67
else if str.startswith(ticker, "SILVER") and timeframe.period == "D" and dir == 1
rate := 61
n := 67
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "D" and dir == -1
rate := 54
n := 61
else if str.startswith(ticker, "SILVER") and timeframe.period == "D" and dir == -1
rate := 54
n := 61
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "60" and dir == 1
rate := 46
n := 1100
else if str.startswith(ticker, "SILVER") and timeframe.period == "60" and dir == 1
rate := 46
n := 1100
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "60" and dir == -1
rate := 39
n := 1110
else if str.startswith(ticker, "SILVER") and timeframe.period == "60" and dir == -1
rate := 39
n := 1110
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "240" and dir == 1
rate := 50
n := 307
else if str.startswith(ticker, "SILVER") and timeframe.period == "240" and dir == 1
rate := 50
n := 307
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "240" and dir == -1
rate := 43
n := 301
else if str.startswith(ticker, "SILVER") and timeframe.period == "240" and dir == -1
rate := 43
n := 301
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "15" and dir == 1
rate := 47
n := 456
else if str.startswith(ticker, "SILVER") and timeframe.period == "15" and dir == 1
rate := 47
n := 456
else if str.startswith(ticker, "XAGUSD") and timeframe.period == "15" and dir == -1
rate := 39
n := 443
else if str.startswith(ticker, "SILVER") and timeframe.period == "15" and dir == -1
rate := 39
n := 443
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "D" and dir == 1
rate := 54
n := 61
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "D" and dir == -1
rate := 47
n := 57
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "60" and dir == 1
rate := 51
n := 1118
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "60" and dir == -1
rate := 46
n := 1130
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "240" and dir == 1
rate := 51
n := 315
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "240" and dir == -1
rate := 46
n := 313
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "15" and dir == 1
rate := 48
n := 434
else if str.startswith(ticker, "XAUUSD") and timeframe.period == "15" and dir == -1
rate := 41
n := 436
else if str.startswith(ticker, "GER40") and timeframe.period == "D" and dir == 1
rate := 60
n := 70
else if str.startswith(ticker, "GER40") and timeframe.period == "D" and dir == -1
rate := 40
n := 88
else if str.startswith(ticker, "GER40") and timeframe.period == "60" and dir == 1
rate := 49
n := 365
else if str.startswith(ticker, "GER40") and timeframe.period == "60" and dir == -1
rate := 47
n := 383
else if str.startswith(ticker, "GER40") and timeframe.period == "240" and dir == 1
rate := 47
n := 145
else if str.startswith(ticker, "GER40") and timeframe.period == "240" and dir == -1
rate := 44
n := 169
else if str.startswith(ticker, "GER40") and timeframe.period == "15" and dir == 1
rate := 52
n := 611
else if str.startswith(ticker, "GER40") and timeframe.period == "15" and dir == -1
rate := 47
n := 615
else if str.startswith(ticker, "JP225") and timeframe.period == "D" and dir == 1
rate := 42
n := 47
else if str.startswith(ticker, "NI225") and timeframe.period == "D" and dir == 1
rate := 42
n := 47
else if str.startswith(ticker, "JP225") and timeframe.period == "D" and dir == -1
rate := 50
n := 59
else if str.startswith(ticker, "NI225") and timeframe.period == "D" and dir == -1
rate := 50
n := 59
else if str.startswith(ticker, "JP225") and timeframe.period == "60" and dir == 1
rate := 52
n := 247
else if str.startswith(ticker, "NI225") and timeframe.period == "60" and dir == 1
rate := 52
n := 247
else if str.startswith(ticker, "JP225") and timeframe.period == "60" and dir == -1
rate := 44
n := 273
else if str.startswith(ticker, "NI225") and timeframe.period == "60" and dir == -1
rate := 44
n := 273
else if str.startswith(ticker, "JP225") and timeframe.period == "240" and dir == 1
rate := 51
n := 91
else if str.startswith(ticker, "NI225") and timeframe.period == "240" and dir == 1
rate := 51
n := 91
else if str.startswith(ticker, "JP225") and timeframe.period == "240" and dir == -1
rate := 52
n := 104
else if str.startswith(ticker, "NI225") and timeframe.period == "240" and dir == -1
rate := 52
n := 104
else if str.startswith(ticker, "JP225") and timeframe.period == "15" and dir == 1
rate := 52
n := 532
else if str.startswith(ticker, "NI225") and timeframe.period == "15" and dir == 1
rate := 52
n := 532
else if str.startswith(ticker, "JP225") and timeframe.period == "15" and dir == -1
rate := 46
n := 550
else if str.startswith(ticker, "NI225") and timeframe.period == "15" and dir == -1
rate := 46
n := 550
else if str.startswith(ticker, "US100") and timeframe.period == "D" and dir == 1
rate := 58
n := 65
else if str.startswith(ticker, "US100") and timeframe.period == "D" and dir == -1
rate := 40
n := 77
else if str.startswith(ticker, "US100") and timeframe.period == "60" and dir == 1
rate := 51
n := 656
else if str.startswith(ticker, "US100") and timeframe.period == "60" and dir == -1
rate := 45
n := 674
else if str.startswith(ticker, "US100") and timeframe.period == "240" and dir == 1
rate := 55
n := 215
else if str.startswith(ticker, "US100") and timeframe.period == "240" and dir == -1
rate := 44
n := 224
else if str.startswith(ticker, "US100") and timeframe.period == "15" and dir == 1
rate := 49
n := 479
else if str.startswith(ticker, "US100") and timeframe.period == "15" and dir == -1
rate := 48
n := 470
else if str.startswith(ticker, "UK100") and timeframe.period == "D" and dir == 1
rate := 56
n := 53
else if str.startswith(ticker, "UK100") and timeframe.period == "D" and dir == -1
rate := 41
n := 74
else if str.startswith(ticker, "UK100") and timeframe.period == "60" and dir == 1
rate := 51
n := 495
else if str.startswith(ticker, "UK100") and timeframe.period == "60" and dir == -1
rate := 43
n := 511
else if str.startswith(ticker, "UK100") and timeframe.period == "240" and dir == 1
rate := 51
n := 154
else if str.startswith(ticker, "UK100") and timeframe.period == "240" and dir == -1
rate := 47
n := 168
else if str.startswith(ticker, "UK100") and timeframe.period == "15" and dir == 1
rate := 48
n := 634
else if str.startswith(ticker, "UK100") and timeframe.period == "15" and dir == -1
rate := 41
n := 631
else if str.startswith(ticker, "US500") and timeframe.period == "D" and dir == 1
rate := 57
n := 61
else if str.startswith(ticker, "US500") and timeframe.period == "D" and dir == -1
rate := 42
n := 76
else if str.startswith(ticker, "US500") and timeframe.period == "60" and dir == 1
rate := 54
n := 655
else if str.startswith(ticker, "US500") and timeframe.period == "60" and dir == -1
rate := 47
n := 667
else if str.startswith(ticker, "US500") and timeframe.period == "240" and dir == 1
rate := 50
n := 207
else if str.startswith(ticker, "US500") and timeframe.period == "240" and dir == -1
rate := 47
n := 223
else if str.startswith(ticker, "US500") and timeframe.period == "15" and dir == 1
rate := 48
n := 474
else if str.startswith(ticker, "US500") and timeframe.period == "15" and dir == -1
rate := 41
n := 467
else if str.startswith(ticker, "USOIL") and timeframe.period == "D" and dir == 1
rate := 51
n := 52
else if str.startswith(ticker, "USOIL") and timeframe.period == "D" and dir == -1
rate := 55
n := 56
else if str.startswith(ticker, "USOIL") and timeframe.period == "60" and dir == 1
rate := 52
n := 634
else if str.startswith(ticker, "USOIL") and timeframe.period == "60" and dir == -1
rate := 46
n := 644
else if str.startswith(ticker, "USOIL") and timeframe.period == "240" and dir == 1
rate := 51
n := 191
else if str.startswith(ticker, "USOIL") and timeframe.period == "240" and dir == -1
rate := 46
n := 190
else if str.startswith(ticker, "USOIL") and timeframe.period == "15" and dir == 1
rate := 48
n := 439
else if str.startswith(ticker, "USOIL") and timeframe.period == "15" and dir == -1
rate := 44
n := 458
else if str.startswith(ticker, "DE40") and timeframe.period == "D" and dir == 1
rate := 60
n := 70
else if str.startswith(ticker, "DE40") and timeframe.period == "D" and dir == -1
rate := 40
n := 88
else if str.startswith(ticker, "DE40") and timeframe.period == "60" and dir == 1
rate := 49
n := 365
else if str.startswith(ticker, "DE40") and timeframe.period == "60" and dir == -1
rate := 47
n := 383
else if str.startswith(ticker, "DE40") and timeframe.period == "240" and dir == 1
rate := 47
n := 145
else if str.startswith(ticker, "DE40") and timeframe.period == "240" and dir == -1
rate := 44
n := 169
else if str.startswith(ticker, "DE40") and timeframe.period == "15" and dir == 1
rate := 52
n := 611
else if str.startswith(ticker, "DE40") and timeframe.period == "15" and dir == -1
rate := 47
n := 615
else if str.startswith(ticker, "FTSE") and timeframe.period == "D" and dir == 1
rate := 56
n := 53
else if str.startswith(ticker, "FTSE") and timeframe.period == "D" and dir == -1
rate := 41
n := 74
else if str.startswith(ticker, "FTSE") and timeframe.period == "60" and dir == 1
rate := 51
n := 495
else if str.startswith(ticker, "FTSE") and timeframe.period == "60" and dir == -1
rate := 43
n := 511
else if str.startswith(ticker, "FTSE") and timeframe.period == "240" and dir == 1
rate := 51
n := 154
else if str.startswith(ticker, "FTSE") and timeframe.period == "240" and dir == -1
rate := 47
n := 168
else if str.startswith(ticker, "FTSE") and timeframe.period == "15" and dir == 1
rate := 48
n := 634
else if str.startswith(ticker, "FTSE") and timeframe.period == "15" and dir == -1
rate := 41
n := 631
else if str.startswith(ticker, "US30") and timeframe.period == "D" and dir == 1
rate := 55
n := 59
else if str.startswith(ticker, "US30") and timeframe.period == "D" and dir == -1
rate := 40
n := 75
else if str.startswith(ticker, "US30") and timeframe.period == "60" and dir == 1
rate := 50
n := 629
else if str.startswith(ticker, "US30") and timeframe.period == "60" and dir == -1
rate := 49
n := 659
else if str.startswith(ticker, "US30") and timeframe.period == "240" and dir == 1
rate := 59
n := 191
else if str.startswith(ticker, "US30") and timeframe.period == "240" and dir == -1
rate := 46
n := 207
else if str.startswith(ticker, "US30") and timeframe.period == "15" and dir == 1
rate := 51
n := 496
else if str.startswith(ticker, "US30") and timeframe.period == "15" and dir == -1
rate := 43
n := 495
else if str.startswith(ticker, "GOLD") and timeframe.period == "D" and dir == 1
rate := 54
n := 61
else if str.startswith(ticker, "GOLD") and timeframe.period == "D" and dir == -1
rate := 47
n := 57
else if str.startswith(ticker, "GOLD") and timeframe.period == "60" and dir == 1
rate := 51
n := 1118
else if str.startswith(ticker, "GOLD") and timeframe.period == "60" and dir == -1
rate := 46
n := 1130
else if str.startswith(ticker, "GOLD") and timeframe.period == "240" and dir == 1
rate := 51
n := 315
else if str.startswith(ticker, "GOLD") and timeframe.period == "240" and dir == -1
rate := 46
n := 313
else if str.startswith(ticker, "GOLD") and timeframe.period == "15" and dir == 1
rate := 48
n := 434
else if str.startswith(ticker, "GOLD") and timeframe.period == "15" and dir == -1
rate := 41
n := 436
else if str.startswith(ticker, "XJO") and timeframe.period == "D" and dir == 1
rate := 56
n := 46
else if str.startswith(ticker, "XJO") and timeframe.period == "D" and dir == -1
rate := 40
n := 60
else if str.startswith(ticker, "XJO") and timeframe.period == "60" and dir == 1
rate := 52
n := 221
else if str.startswith(ticker, "XJO") and timeframe.period == "60" and dir == -1
rate := 49
n := 242
else if str.startswith(ticker, "XJO") and timeframe.period == "240" and dir == 1
rate := 54
n := 110
else if str.startswith(ticker, "XJO") and timeframe.period == "240" and dir == -1
rate := 44
n := 127
else if str.startswith(ticker, "XJO") and timeframe.period == "15" and dir == 1
rate := 51
n := 551
else if str.startswith(ticker, "XJO") and timeframe.period == "15" and dir == -1
rate := 44
n := 568
else if str.startswith(ticker, "DAX") and timeframe.period == "D" and dir == 1
rate := 60
n := 70
else if str.startswith(ticker, "DAX") and timeframe.period == "D" and dir == -1
rate := 40
n := 88
else if str.startswith(ticker, "DAX") and timeframe.period == "60" and dir == 1
rate := 49
n := 365
else if str.startswith(ticker, "DAX") and timeframe.period == "60" and dir == -1
rate := 47
n := 383
else if str.startswith(ticker, "DAX") and timeframe.period == "240" and dir == 1
rate := 47
n := 145
else if str.startswith(ticker, "DAX") and timeframe.period == "240" and dir == -1
rate := 44
n := 169
else if str.startswith(ticker, "DAX") and timeframe.period == "15" and dir == 1
rate := 52
n := 611
else if str.startswith(ticker, "DAX") and timeframe.period == "15" and dir == -1
rate := 47
n := 615
else if str.startswith(ticker, "NKY") and timeframe.period == "D" and dir == 1
rate := 42
n := 47
else if str.startswith(ticker, "NKY") and timeframe.period == "D" and dir == -1
rate := 50
n := 59
else if str.startswith(ticker, "NKY") and timeframe.period == "60" and dir == 1
rate := 52
n := 247
else if str.startswith(ticker, "NKY") and timeframe.period == "60" and dir == -1
rate := 44
n := 273
else if str.startswith(ticker, "NKY") and timeframe.period == "240" and dir == 1
rate := 51
n := 91
else if str.startswith(ticker, "NKY") and timeframe.period == "240" and dir == -1
rate := 52
n := 104
else if str.startswith(ticker, "NKY") and timeframe.period == "15" and dir == 1
rate := 52
n := 532
else if str.startswith(ticker, "NKY") and timeframe.period == "15" and dir == -1
rate := 46
n := 550
else if str.startswith(ticker, "NDX") and timeframe.period == "D" and dir == 1
rate := 58
n := 65
else if str.startswith(ticker, "NDX") and timeframe.period == "D" and dir == -1
rate := 40
n := 77
else if str.startswith(ticker, "NDX") and timeframe.period == "60" and dir == 1
rate := 51
n := 656
else if str.startswith(ticker, "NDX") and timeframe.period == "60" and dir == -1
rate := 45
n := 674
else if str.startswith(ticker, "NDX") and timeframe.period == "240" and dir == 1
rate := 55
n := 215
else if str.startswith(ticker, "NDX") and timeframe.period == "240" and dir == -1
rate := 44
n := 224
else if str.startswith(ticker, "NDX") and timeframe.period == "15" and dir == 1
rate := 49
n := 479
else if str.startswith(ticker, "NDX") and timeframe.period == "15" and dir == -1
rate := 48
n := 470
else if str.startswith(ticker, "UKX") and timeframe.period == "D" and dir == 1
rate := 56
n := 53
else if str.startswith(ticker, "UKX") and timeframe.period == "D" and dir == -1
rate := 41
n := 74
else if str.startswith(ticker, "UKX") and timeframe.period == "60" and dir == 1
rate := 51
n := 495
else if str.startswith(ticker, "UKX") and timeframe.period == "60" and dir == -1
rate := 43
n := 511
else if str.startswith(ticker, "UKX") and timeframe.period == "240" and dir == 1
rate := 51
n := 154
else if str.startswith(ticker, "UKX") and timeframe.period == "240" and dir == -1
rate := 47
n := 168
else if str.startswith(ticker, "UKX") and timeframe.period == "15" and dir == 1
rate := 48
n := 634
else if str.startswith(ticker, "UKX") and timeframe.period == "15" and dir == -1
rate := 41
n := 631
else if str.startswith(ticker, "DJI") and timeframe.period == "D" and dir == 1
rate := 55
n := 59
else if str.startswith(ticker, "DJI") and timeframe.period == "D" and dir == -1
rate := 40
n := 75
else if str.startswith(ticker, "DJI") and timeframe.period == "60" and dir == 1
rate := 50
n := 629
else if str.startswith(ticker, "DJI") and timeframe.period == "60" and dir == -1
rate := 49
n := 659
else if str.startswith(ticker, "DJI") and timeframe.period == "240" and dir == 1
rate := 59
n := 191
else if str.startswith(ticker, "DJI") and timeframe.period == "240" and dir == -1
rate := 46
n := 207
else if str.startswith(ticker, "DJI") and timeframe.period == "15" and dir == 1
rate := 51
n := 496
else if str.startswith(ticker, "DJI") and timeframe.period == "15" and dir == -1
rate := 43
n := 495
else if str.startswith(ticker, "SPX") and timeframe.period == "D" and dir == 1
rate := 57
n := 61
else if str.startswith(ticker, "SPX") and timeframe.period == "D" and dir == -1
rate := 42
n := 76
else if str.startswith(ticker, "SPX") and timeframe.period == "60" and dir == 1
rate := 54
n := 655
else if str.startswith(ticker, "SPX") and timeframe.period == "60" and dir == -1
rate := 47
n := 667
else if str.startswith(ticker, "SPX") and timeframe.period == "240" and dir == 1
rate := 50
n := 207
else if str.startswith(ticker, "SPX") and timeframe.period == "240" and dir == -1
rate := 47
n := 223
else if str.startswith(ticker, "SPX") and timeframe.period == "15" and dir == 1
rate := 48
n := 474
else if str.startswith(ticker, "SPX") and timeframe.period == "15" and dir == -1
rate := 41
n := 467
else if str.startswith(ticker, "WTI") and timeframe.period == "D" and dir == 1
rate := 51
n := 52
else if str.startswith(ticker, "WTI") and timeframe.period == "D" and dir == -1
rate := 55
n := 56
else if str.startswith(ticker, "WTI") and timeframe.period == "60" and dir == 1
rate := 52
n := 634
else if str.startswith(ticker, "WTI") and timeframe.period == "60" and dir == -1
rate := 46
n := 644
else if str.startswith(ticker, "WTI") and timeframe.period == "240" and dir == 1
rate := 51
n := 191
else if str.startswith(ticker, "WTI") and timeframe.period == "240" and dir == -1
rate := 46
n := 190
else if str.startswith(ticker, "WTI") and timeframe.period == "15" and dir == 1
rate := 48
n := 439
else if str.startswith(ticker, "WTI") and timeframe.period == "15" and dir == -1
rate := 44
n := 458
else if str.startswith(ticker, "NQ") and timeframe.period == "D" and dir == 1
rate := 58
n := 65
else if str.startswith(ticker, "NQ") and timeframe.period == "D" and dir == -1
rate := 40
n := 77
else if str.startswith(ticker, "NQ") and timeframe.period == "60" and dir == 1
rate := 51
n := 656
else if str.startswith(ticker, "NQ") and timeframe.period == "60" and dir == -1
rate := 45
n := 674
else if str.startswith(ticker, "NQ") and timeframe.period == "240" and dir == 1
rate := 55
n := 215
else if str.startswith(ticker, "NQ") and timeframe.period == "240" and dir == -1
rate := 44
n := 224
else if str.startswith(ticker, "NQ") and timeframe.period == "15" and dir == 1
rate := 49
n := 479
else if str.startswith(ticker, "NQ") and timeframe.period == "15" and dir == -1
rate := 48
n := 470
else if str.startswith(ticker, "YM") and timeframe.period == "D" and dir == 1
rate := 55
n := 59
else if str.startswith(ticker, "YM") and timeframe.period == "D" and dir == -1
rate := 40
n := 75
else if str.startswith(ticker, "YM") and timeframe.period == "60" and dir == 1
rate := 50
n := 629
else if str.startswith(ticker, "YM") and timeframe.period == "60" and dir == -1
rate := 49
n := 659
else if str.startswith(ticker, "YM") and timeframe.period == "240" and dir == 1
rate := 59
n := 191
else if str.startswith(ticker, "YM") and timeframe.period == "240" and dir == -1
rate := 46
n := 207
else if str.startswith(ticker, "YM") and timeframe.period == "15" and dir == 1
rate := 51
n := 496
else if str.startswith(ticker, "YM") and timeframe.period == "15" and dir == -1
rate := 43
n := 495
else if str.startswith(ticker, "ES") and timeframe.period == "D" and dir == 1
rate := 57
n := 61
else if str.startswith(ticker, "ES") and timeframe.period == "D" and dir == -1
rate := 42
n := 76
else if str.startswith(ticker, "ES") and timeframe.period == "60" and dir == 1
rate := 54
n := 655
else if str.startswith(ticker, "ES") and timeframe.period == "60" and dir == -1
rate := 47
n := 667
else if str.startswith(ticker, "ES") and timeframe.period == "240" and dir == 1
rate := 50
n := 207
else if str.startswith(ticker, "ES") and timeframe.period == "240" and dir == -1
rate := 47
n := 223
else if str.startswith(ticker, "ES") and timeframe.period == "15" and dir == 1
rate := 48
n := 474
else if str.startswith(ticker, "ES") and timeframe.period == "15" and dir == -1
rate := 41
n := 467
else if str.startswith(ticker, "CL") and timeframe.period == "D" and dir == 1
rate := 51
n := 52
else if str.startswith(ticker, "CL") and timeframe.period == "D" and dir == -1
rate := 55
n := 56
else if str.startswith(ticker, "CL") and timeframe.period == "60" and dir == 1
rate := 52
n := 634
else if str.startswith(ticker, "CL") and timeframe.period == "60" and dir == -1
rate := 46
n := 644
else if str.startswith(ticker, "CL") and timeframe.period == "240" and dir == 1
rate := 51
n := 191
else if str.startswith(ticker, "CL") and timeframe.period == "240" and dir == -1
rate := 46
n := 190
else if str.startswith(ticker, "CL") and timeframe.period == "15" and dir == 1
rate := 48
n := 439
else if str.startswith(ticker, "CL") and timeframe.period == "15" and dir == -1
rate := 44
n := 458
[rate, n]
emaUse = fltTrendTf == "" ? emaChart : emaHtf
var int sigLastBar = na
inSes = not fltSes or not na(time(timeframe.period, fltSesion))
gapOk = fltGap == 0 or na(sigLastBar) or bar_index - sigLastBar >= fltGap
atrOk = not fltAtr or sigAtr >= fltAtrMin
// GII: Pine cannot read the GII API, so the user pastes the day's code:
// G1|<as_of yyyy-mm-dd>|<score>|<zone -2..2>|<up %>|<down %>|<base up %>|<horizon sessions>|<check>
// check = sum over the characters before the last "|" of (position in "0123456789-.|G" + 1) x (index + 1), mod 9973.
// The check only catches typing errors; the Ed25519 signature of the API is NOT checked here.
// The data of date d is used from d + 1 day 01:00 UTC; bars before that, or older than giiMaxAge days, ignore GII.
giiCheck(string p) =>
int giiAcc = 0
for giiI = 0 to str.length(p) - 1
int giiK = str.pos("0123456789-.|G", str.substring(p, giiI, giiI + 1))
giiAcc := (giiAcc + (na(giiK) ? 99 : giiK + 1) * (giiI + 1)) % 9973
giiAcc
giiGold = str.contains(str.upper(syminfo.ticker), "XAU") or str.contains(str.upper(syminfo.ticker), "GOLD")
giiClean = str.replace_all(giiCode, " ", "")
giiParts = str.split(giiClean, "|")
giiHave = array.size(giiParts) == 9 and array.get(giiParts, 0) == "G1"
giiChk = giiHave ? str.tonumber(array.get(giiParts, 8)) : na
giiValid = giiHave and str.length(array.get(giiParts, 1)) == 10 and not na(giiChk) and
giiCheck(str.substring(giiClean, 0, str.length(giiClean) - str.length(array.get(giiParts, 8)) - 1)) == int(giiChk)
giiAsOf = giiValid ? timestamp("UTC", int(str.tonumber(str.substring(array.get(giiParts, 1), 0, 4))), int(str.tonumber(str.substring(array.get(giiParts, 1), 5, 7))), int(str.tonumber(str.substring(array.get(giiParts, 1), 8, 10))), 0, 0) : na
giiZone = giiValid ? str.tonumber(array.get(giiParts, 3)) : na
giiUse = giiValid and giiGold and time >= giiAsOf + 25 * 3600000 and time - giiAsOf <= giiMaxAge * 86400000
giiBuyOk = not giiFilter or not giiUse or giiZone >= 1
giiSellOk = not giiFilter or not giiUse or giiZone <= -1
common = barstate.isconfirmed and inSes and gapOk and atrOk and not na(sigAtr)
buySig = common and rawBuy and (not fltTrend or close > emaUse) and giiBuyOk
sellSig = common and rawSell and not buySig and (not fltTrend or close < emaUse) and giiSellOk
sigRisk = sigAtr * sigSlAtr
sigEntry = buySig or sellSig ? close : na
sigSL = buySig ? close - sigRisk : sellSig ? close + sigRisk : na
sigTP = buySig ? close + sigRisk * sigRR : sellSig ? close - sigRisk * sigRR : na
var float lastEntry = na
var float lastSL = na
var float lastTP = na
var int lastDir = 0
var string lastWhy = ""
var int lastTime = na
if buySig or sellSig
sigLastBar := bar_index
lastEntry := sigEntry
lastSL := sigSL
lastTP := sigTP
lastDir := buySig ? 1 : -1
lastWhy := buySig ? whyBuy : whySell
lastTime := time
if sigLabels
[arrowRate, arrowN] = dnxArrowRate(lastDir, 0)
string arrowText = lastWhy + (na(arrowRate) ? "" : " " + (lastDir > 0 ? "Buy 1:1 " : "Sell 1:1 ") +
str.tostring(arrowRate, "#") + "%" + (DNX_ARROW_ALL ? " all mkts" : "") + " (n=" + str.tostring(arrowN) + ")")
label.new(bar_index, buySig ? low - sigAtr * 0.9 : high + sigAtr * 0.9, arrowText, style = label.style_none,
textcolor = buySig ? color.lime : color.red, size = size.small, force_overlay = true)
if sigLevels
line.new(bar_index, sigEntry, bar_index + sigLvlLen, sigEntry, color = color.silver, force_overlay = true)
line.new(bar_index, sigSL, bar_index + sigLvlLen, sigSL, color = color.red, style = line.style_dashed, force_overlay = true)
line.new(bar_index, sigTP, bar_index + sigLvlLen, sigTP, color = color.lime, style = line.style_dashed, force_overlay = true)
plotshape(sigArrows and buySig, "Buy arrow", shape.triangleup, location.belowbar, color.lime, size = size.small, force_overlay = true)
plotshape(sigArrows and sellSig, "Sell arrow", shape.triangledown, location.abovebar, color.red, size = size.small, force_overlay = true)
// hidden values for strategies and webhooks (Data Window only)
plot(buySig ? 1 : 0, "Buy signal", display = display.data_window, editable = false)
plot(sellSig ? 1 : 0, "Sell signal", display = display.data_window, editable = false)
plot(sigSL, "Signal SL", display = display.data_window, editable = false)
plot(sigTP, "Signal TP", display = display.data_window, editable = false)
plot(sigEntry, "Signal entry", display = display.data_window, editable = false)
alertcondition(buySig, "DNX " + DNX_NAME + " Buy", "DNX " + DNX_NAME + " BUY {{ticker}} {{interval}} close {{close}}")
alertcondition(sellSig, "DNX " + DNX_NAME + " Sell", "DNX " + DNX_NAME + " SELL {{ticker}} {{interval}} close {{close}}")
pnlWhere = pnlPos == "top_left" ? position.top_left : pnlPos == "bottom_left" ? position.bottom_left :
pnlPos == "bottom_right" ? position.bottom_right : position.top_right
var table pnl = table.new(pnlWhere, 1, 9, bgcolor = color.new(color.black, 20), border_width = 1, force_overlay = true)
if pnlShow and barstate.islast
table.cell(pnl, 0, 0, "DinexSpace | " + DNX_NAME, text_color = color.white, text_size = size.small)
if lastDir == 0
table.cell(pnl, 0, 1,"No signal yet", text_color = color.silver, text_size = size.small)
else
table.cell(pnl, 0, 1, (lastDir > 0 ? ("BUY ▲ ") : ("SELL ▼ ")) + lastWhy,
text_color = lastDir > 0 ? color.lime : color.red, text_size = size.small)
table.cell(pnl, 0, 2, ("Price ") + str.tostring(lastEntry, format.mintick) + " SL " +
str.tostring(lastSL, format.mintick) + " TP " + str.tostring(lastTP, format.mintick),
text_color = color.silver, text_size = size.small)
table.cell(pnl, 0, 3, str.format_time(lastTime, "yyyy-MM-dd HH:mm", syminfo.timezone) + " · " +
str.tostring(bar_index - sigLastBar) + (" bars ago"),
text_color = color.silver, text_size = size.small)
[panelRate, panelN] = dnxArrowRate(lastDir, bar_index - sigLastBar)
table.cell(pnl, 0, 4, na(panelRate) ? "" : "Win 1:1 " + str.tostring(panelRate, "#") + (DNX_ARROW_ALL ? "% all mkts" : "%") +
" (n=" + str.tostring(panelN) + ")", text_color = color.silver, text_size = size.small)
if giiShow and giiGold
if not giiValid
table.cell(pnl, 0, 5, giiCode == "" ? "GII: no code entered (input GII code)" : "GII code invalid: check digits",
text_color = color.orange, text_size = size.small)
table.cell(pnl, 0, 6, "Copy today's code from the DinexSpace GII page", text_color = color.gray, text_size = size.small)
else
bool giiStale = timenow - giiAsOf > giiMaxAge * 86400000
float gUp = str.tonumber(array.get(giiParts, 4))
float gDn = str.tonumber(array.get(giiParts, 5))
table.cell(pnl, 0, 5, "Gold potential (" + array.get(giiParts, 7) + " D1 sessions): Up " + str.tostring(gUp, "#") +
"% / Down " + str.tostring(gDn, "#") + "%",
text_color = giiStale ? color.gray : gUp > gDn ? color.lime : gUp < gDn ? color.red : color.silver, text_size = size.small)
table.cell(pnl, 0, 6, "Base rate up " + array.get(giiParts, 6) + "% · GII score " + array.get(giiParts, 2) +
" · zone " + array.get(giiParts, 3), text_color = color.silver, text_size = size.small)
table.cell(pnl, 0, 7, "GII data " + array.get(giiParts, 1) + " · pasted code, signature not checked · " +
(giiStale ? "STALE: filter ignores GII" : "fresh"), text_color = giiStale ? color.orange : color.silver, text_size = size.small)
table.cell(pnl, 0, 8, (giiFilter ? "GII filter ON" : "GII filter off") + " · GII not validated, reference only",
text_color = color.gray, text_size = size.small)
// ---- end of DinexSpace signal layer ----
Câu hỏi về Range Filter
Range Filter miễn phí, chạy trên MT5 và TradingView và không đặt lệnh.
Range Filter có miễn phí không?
Có. Range Filter miễn phí, tải trực tiếp trên trang này, không cần đăng ký. Gói tải về có sẵn mã nguồn.
Range Filter chạy trên nền tảng nào?
Range Filter có bản cho MetaTrader 5 (MQL5) và TradingView (Pine Script v6).
Range Filter có cho tín hiệu Mua/Bán không?
Range Filter cho tín hiệu Mua khi nến vừa đóng đẩy đường lọc đi lên sau một đoạn đi xuống (nhãn "RF turned up") và tín hiệu Bán khi nến vừa đóng đẩy đường lọc đi xuống sau một đoạn đi lên (nhãn "RF turned down"). Chỉ báo không vẽ lại: tín hiệu chỉ được xác nhận khi nến đóng.
Range Filter có cảnh báo không?
Có. Range Filter có cảnh báo sẵn: MT5 – cửa sổ báo, thông báo đẩy, email, âm thanh; TradingView – điều kiện cảnh báo dùng trong Create Alert.
EA có đọc được Range Filter không?
Có. Bản MT5 của Range Filter đưa các đường vẽ ra buffer để EA đọc bằng iCustom và CopyBuffer: Filter, Upper band, Lower band, Buy, Sell, Signal SL, Signal TP, Signal entry, Signal filter, Confluence score, Win rate %, Sample size, Bar buy odds %, Bar buy samples, Bar sell odds %, Bar sell samples, Lean, Bar buy score, Bar sell score.
Range Filter dùng trên khung thời gian nào?
Range Filter chạy trên mọi khung thời gian của biểu đồ. Phần tính toán đọc khung thời gian của biểu đồ hoặc một khung cố định (ví dụ D1 hay khung lớn hơn), như mô tả ở phần Chức năng.
Range Filter có tự đặt lệnh không?
Không. Đây là chỉ báo, chỉ đọc dữ liệu và hiển thị kết quả trên biểu đồ hoặc xuất ra tệp. Mã nguồn không có lệnh mở, đóng hay sửa lệnh.
Cài Range Filter thế nào?
Tải gói .zip rồi làm theo hướng dẫn cài đặt từng bước cho MT5 và TradingView: https://indicators.dinexspace.com/vi/huong-dan-cai-dat/
Tín hiệu của Range Filter có vẽ lại không?
Không. Tín hiệu chỉ xuất hiện khi nến đã đóng. Khi kiểm trên XAUUSD H1, 964/964 tín hiệu lúc chạy trùng với lúc tính lại toàn bộ lịch sử.
Tỷ lệ thắng kiểm thử
Đã đo
Ngoài mẫu khung H1: 2/21 mã trên mức hoà vốn sau chi phí.
Vuốt ngang để xem đủ các khung.
| Mã | M15 | H1 | H4 | D1 |
|---|---|---|---|---|
| AUDUSD | 43.9% (n=2037; hoà vốn 60.5%) | 47.5% (n=511; hoà vốn 55.0%) | 55.7% (n=122; hoà vốn 52.4%) | – |
| AUS200 | 46.4% (n=453; hoà vốn 63.8%) | 41.3% (n=138; hoà vốn 56.0%) | 49.0% (n=49; hoà vốn 53.6%) | – |
| BNB | – | 48.4% (n=651; hoà vốn 56.7%) | 54.7% (n=170; hoà vốn 53.0%) | – |
| BTCUSD | 47.0% (n=2676; hoà vốn 53.2%) | 49.7% (n=682; hoà vốn 51.5%) | 51.9% (n=187; hoà vốn 50.7%) | 50.0% (n=34; hoà vốn 50.2%) |
| ETHUSD | 47.3% (n=2662; hoà vốn 56.6%) | 49.7% (n=670; hoà vốn 53.0%) | 48.1% (n=183; hoà vốn 51.4%) | – |
| EURUSD | 45.2% (n=2044; hoà vốn 57.0%) | 44.1% (n=524; hoà vốn 53.4%) | 49.6% (n=135; hoà vốn 51.7%) | – |
| GBPUSD | 45.4% (n=2024; hoà vốn 57.4%) | 42.4% (n=531; hoà vốn 53.6%) | 49.6% (n=135; hoà vốn 51.8%) | – |
| GER40 | 48.7% (n=1578; hoà vốn 53.2%) | 53.4% (n=401; hoà vốn 51.6%) | 51.1% (n=137; hoà vốn 50.8%) | – |
| JP225 | 47.4% (n=1668; hoà vốn 56.6%) | 54.5% (n=407; hoà vốn 53.1%) | 53.5% (n=115; hoà vốn 51.3%) | – |
| NAS100 | 49.1% (n=2078; hoà vốn 51.6%) | 49.7% (n=517; hoà vốn 50.7%) | 56.7% (n=171; hoà vốn 50.3%) | – |
| NZDUSD | 41.6% (n=1936; hoà vốn 64.7%) | 43.4% (n=521; hoà vốn 57.1%) | 53.1% (n=130; hoà vốn 53.2%) | – |
| SOLUSD | 35.0% (n=2586; hoà vốn 79.3%) | 45.1% (n=650; hoà vốn 63.7%) | 49.1% (n=175; hoà vốn 55.5%) | 37.5% (n=32; hoà vốn 50.5%) |
| UK100 | 43.9% (n=1664; hoà vốn 61.0%) | 49.5% (n=416; hoà vốn 55.4%) | 43.7% (n=103; hoà vốn 52.6%) | – |
| US30 | 48.6% (n=2075; hoà vốn 52.1%) | 49.2% (n=534; hoà vốn 51.1%) | 49.4% (n=157; hoà vốn 50.5%) | – |
| US500 | 46.7% (n=2078; hoà vốn 54.1%) | 51.7% (n=545; hoà vốn 52.0%) | 57.0% (n=149; hoà vốn 51.0%) | – |
| USDCAD | 42.0% (n=2030; hoà vốn 60.9%) | 42.8% (n=481; hoà vốn 55.3%) | 60.7% (n=117; hoà vốn 52.6%) | – |
| USDCHF | 41.0% (n=2003; hoà vốn 62.1%) | 47.1% (n=484; hoà vốn 55.6%) | 53.3% (n=150; hoà vốn 52.7%) | – |
| USDJPY | 43.5% (n=1977; hoà vốn 57.8%) | 48.9% (n=518; hoà vốn 53.6%) | 44.0% (n=134; hoà vốn 51.7%) | – |
| WTI | 45.9% (n=2048; hoà vốn 55.5%) | 51.5% (n=540; hoà vốn 52.7%) | 45.1% (n=153; hoà vốn 51.3%) | 55.2% (n=30; hoà vốn 50.4%) |
| XAGUSD | 44.3% (n=1961; hoà vốn 57.1%) | 46.2% (n=496; hoà vốn 53.4%) | 44.4% (n=153; hoà vốn 51.7%) | 60.0% (n=35; hoà vốn 50.6%) |
| XAUUSD | 48.6% (n=1918; hoà vốn 51.7%) | 48.5% (n=138; hoà vốn 51.4%)đã đo đến 2024-10-16 | 50.3% (n=145; hoà vốn 50.4%) | 48.7% (n=39; hoà vốn 50.2%) |
Không có dữ liệu: HK50, KOSPI
Vuốt ngang để xem đủ các khung.
| Mã | M15 | H1 | H4 | D1 |
|---|---|---|---|---|
| AUDUSD | 48.0% (n=752; hoà vốn 56.4%) | 49.1% (n=2213; hoà vốn 51.3%) | 47.9% (n=608; hoà vốn 50.6%) | 50.5% (n=103; hoà vốn 50.3%) |
| AUS200 | 48.1% (n=1119; hoà vốn 56.4%) | 51.2% (n=463; hoà vốn 51.9%) | 48.9% (n=237; hoà vốn 51.0%) | 43.5% (n=92; hoà vốn 50.6%) |
| BNB | – | 46.7% (n=1496; hoà vốn 54.2%) | 47.9% (n=378; hoà vốn 52.0%) | 51.1% (n=47; hoà vốn 50.8%) |
| BTCUSD | – | 52.5% (n=324; hoà vốn 51.0%) | 55.8% (n=86; hoà vốn 50.5%) | – |
| ETHUSD | – | 47.0% (n=349; hoà vốn 52.1%) | 47.8% (n=92; hoà vốn 51.1%) | – |
| EURUSD | 43.9% (n=765; hoà vốn 57.7%) | 50.4% (n=2238; hoà vốn 51.5%) | 47.6% (n=653; hoà vốn 50.8%) | 50.0% (n=114; hoà vốn 50.1%) |
| GBPUSD | 45.7% (n=742; hoà vốn 53.9%) | 49.9% (n=2253; hoà vốn 51.0%) | 50.4% (n=613; hoà vốn 50.5%) | 51.8% (n=110; hoà vốn 50.2%) |
| GER40 | 50.0% (n=1226; hoà vốn 51.4%) | 48.2% (n=749; hoà vốn 50.3%) | 46.2% (n=314; hoà vốn 50.1%) | 47.1% (n=138; hoà vốn 50.0%) |
| JP225 | 49.7% (n=1082; hoà vốn 52.5%) | 48.1% (n=520; hoà vốn 50.6%) | 52.3% (n=195; hoà vốn 50.2%) | 45.4% (n=97; hoà vốn 50.1%) |
| NAS100 | 48.9% (n=949; hoà vốn 51.6%) | 48.5% (n=1330; hoà vốn 50.1%) | 49.9% (n=439; hoà vốn 50.1%) | 48.9% (n=139; hoà vốn 50.0%) |
| NZDUSD | 41.5% (n=750; hoà vốn 61.0%) | 49.8% (n=2172; hoà vốn 52.6%) | 47.5% (n=579; hoà vốn 51.3%) | 53.7% (n=108; hoà vốn 50.5%) |
| SOLUSD | – | 54.3% (n=346; hoà vốn 50.2%) | 54.0% (n=87; hoà vốn 50.1%) | – |
| UK100 | 45.2% (n=1265; hoà vốn 53.0%) | 47.2% (n=1006; hoà vốn 50.4%) | 49.4% (n=322; hoà vốn 50.2%) | 48.8% (n=121; hoà vốn 50.1%) |
| US30 | 47.2% (n=991; hoà vốn 52.0%) | 49.9% (n=1288; hoà vốn 50.1%) | 52.5% (n=398; hoà vốn 50.1%) | 45.9% (n=122; hoà vốn 50.0%) |
| US500 | 45.3% (n=941; hoà vốn 53.8%) | 50.8% (n=1322; hoà vốn 50.3%) | 48.6% (n=430; hoà vốn 50.1%) | 48.4% (n=124; hoà vốn 50.0%) |
| USDCAD | 40.5% (n=773; hoà vốn 56.1%) | 47.5% (n=2291; hoà vốn 51.1%) | 49.7% (n=581; hoà vốn 50.6%) | 49.1% (n=108; hoà vốn 50.3%) |
| USDCHF | 39.5% (n=853; hoà vốn 61.5%) | 48.9% (n=2206; hoà vốn 51.7%) | 51.1% (n=569; hoà vốn 50.8%) | 52.5% (n=122; hoà vốn 50.3%) |
| USDJPY | 44.8% (n=756; hoà vốn 56.2%) | 48.0% (n=2233; hoà vốn 51.7%) | 52.7% (n=609; hoà vốn 50.8%) | 48.1% (n=106; hoà vốn 50.2%) |
| WTI | 46.8% (n=897; hoà vốn 53.2%) | 49.9% (n=1278; hoà vốn 50.3%) | 48.9% (n=382; hoà vốn 50.1%) | 54.5% (n=110; hoà vốn 50.0%) |
| XAGUSD | 43.7% (n=900; hoà vốn 57.2%) | 42.9% (n=2211; hoà vốn 59.5%) | 47.1% (n=609; hoà vốn 54.8%) | 58.6% (n=128; hoà vốn 52.2%) |
| XAUUSD | 45.0% (n=871; hoà vốn 52.3%) | 49.1% (n=2248; hoà vốn 51.4%) | 49.2% (n=628; hoà vốn 50.7%) | 51.3% (n=119; hoà vốn 50.3%) |
Không có dữ liệu: HK50, KOSPI
Cũng đã đo: tỷ lệ thắng TP 1:2 và 1:3
| Mẫu · mã · khung | 1:2 | 1:3 |
|---|---|---|
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUDUSD · M15 | 29.1% | 20.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUDUSD · H1 | 29.2% | 23.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUDUSD · H4 | 39.3% | 32.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUS200 · M15 | 32.5% | 24.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUS200 · H1 | 27.5% | 23.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · AUS200 · H4 | 32.6% | 28.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BNB · H1 | 32.0% | 24.0% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BNB · H4 | 33.5% | 26.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BTCUSD · M15 | 32.6% | 24.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BTCUSD · H1 | 31.2% | 25.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BTCUSD · H4 | 34.8% | 24.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · BTCUSD · D1 | 29.4% | 29.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · ETHUSD · M15 | 32.7% | 25.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · ETHUSD · H1 | 34.3% | 26.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · ETHUSD · H4 | 31.7% | 24.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · EURUSD · M15 | 30.0% | 21.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · EURUSD · H1 | 28.6% | 20.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · EURUSD · H4 | 34.1% | 26.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GBPUSD · M15 | 28.6% | 21.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GBPUSD · H1 | 28.1% | 20.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GBPUSD · H4 | 34.1% | 24.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GER40 · M15 | 32.8% | 26.5% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GER40 · H1 | 38.9% | 27.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · GER40 · H4 | 34.3% | 19.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · JP225 · M15 | 33.8% | 26.5% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · JP225 · H1 | 35.4% | 25.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · JP225 · H4 | 38.6% | 27.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NAS100 · M15 | 35.0% | 25.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NAS100 · H1 | 34.2% | 27.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NAS100 · H4 | 38.2% | 27.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NZDUSD · M15 | 27.4% | 20.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NZDUSD · H1 | 29.6% | 21.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · NZDUSD · H4 | 35.4% | 23.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · SOLUSD · M15 | 26.1% | 20.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · SOLUSD · H1 | 30.0% | 23.0% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · SOLUSD · H4 | 34.9% | 27.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · SOLUSD · D1 | 28.1% | 15.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · UK100 · M15 | 30.3% | 22.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · UK100 · H1 | 32.7% | 23.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · UK100 · H4 | 29.4% | 22.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US30 · M15 | 32.3% | 24.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US30 · H1 | 33.7% | 25.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US30 · H4 | 33.6% | 27.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US500 · M15 | 32.0% | 23.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US500 · H1 | 35.4% | 27.5% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · US500 · H4 | 40.5% | 27.9% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCAD · M15 | 28.0% | 20.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCAD · H1 | 29.5% | 22.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCAD · H4 | 42.7% | 27.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCHF · M15 | 27.8% | 20.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCHF · H1 | 32.9% | 23.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDCHF · H4 | 38.7% | 31.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDJPY · M15 | 29.6% | 21.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDJPY · H1 | 33.0% | 24.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · USDJPY · H4 | 33.6% | 22.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · WTI · M15 | 30.7% | 23.1% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · WTI · H1 | 34.3% | 24.7% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · WTI · H4 | 30.3% | 23.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · WTI · D1 | 37.9% | 21.4% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAGUSD · M15 | 29.4% | 22.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAGUSD · H1 | 31.9% | 23.6% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAGUSD · H4 | 30.7% | 24.2% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAGUSD · D1 | 45.7% | 30.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAUUSD · M15 | 32.9% | 24.8% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAUUSD · H1 | 33.3% | 28.3% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAUUSD · H4 | 37.2% | 27.0% |
| Ngoài mẫu: 2024-01-01 đến 2026-11-16 · XAUUSD · D1 | 28.2% | 23.1% |
| Trong mẫu: đến 2023-12-31 · AUDUSD · M15 | 32.6% | 24.3% |
| Trong mẫu: đến 2023-12-31 · AUDUSD · H1 | 33.2% | 25.7% |
| Trong mẫu: đến 2023-12-31 · AUDUSD · H4 | 31.9% | 23.5% |
| Trong mẫu: đến 2023-12-31 · AUDUSD · D1 | 38.8% | 30.1% |
| Trong mẫu: đến 2023-12-31 · AUS200 · M15 | 33.7% | 27.0% |
| Trong mẫu: đến 2023-12-31 · AUS200 · H1 | 34.6% | 26.1% |
| Trong mẫu: đến 2023-12-31 · AUS200 · H4 | 34.6% | 24.9% |
| Trong mẫu: đến 2023-12-31 · AUS200 · D1 | 29.3% | 20.6% |
| Trong mẫu: đến 2023-12-31 · BNB · H1 | 32.7% | 24.8% |
| Trong mẫu: đến 2023-12-31 · BNB · H4 | 34.1% | 26.8% |
| Trong mẫu: đến 2023-12-31 · BNB · D1 | 40.4% | 34.0% |
| Trong mẫu: đến 2023-12-31 · BTCUSD · H1 | 31.6% | 23.4% |
| Trong mẫu: đến 2023-12-31 · BTCUSD · H4 | 30.2% | 24.7% |
| Trong mẫu: đến 2023-12-31 · ETHUSD · H1 | 32.5% | 23.6% |
| Trong mẫu: đến 2023-12-31 · ETHUSD · H4 | 33.0% | 22.2% |
| Trong mẫu: đến 2023-12-31 · EURUSD · M15 | 27.5% | 21.3% |
| Trong mẫu: đến 2023-12-31 · EURUSD · H1 | 34.1% | 25.7% |
| Trong mẫu: đến 2023-12-31 · EURUSD · H4 | 30.5% | 23.2% |
| Trong mẫu: đến 2023-12-31 · EURUSD · D1 | 35.1% | 25.4% |
| Trong mẫu: đến 2023-12-31 · GBPUSD · M15 | 30.5% | 22.1% |
| Trong mẫu: đến 2023-12-31 · GBPUSD · H1 | 34.0% | 25.9% |
| Trong mẫu: đến 2023-12-31 · GBPUSD · H4 | 34.4% | 24.2% |
| Trong mẫu: đến 2023-12-31 · GBPUSD · D1 | 32.7% | 20.9% |
| Trong mẫu: đến 2023-12-31 · GER40 · M15 | 32.9% | 23.9% |
| Trong mẫu: đến 2023-12-31 · GER40 · H1 | 32.3% | 24.2% |
| Trong mẫu: đến 2023-12-31 · GER40 · H4 | 29.6% | 23.4% |
| Trong mẫu: đến 2023-12-31 · GER40 · D1 | 28.3% | 22.5% |
| Trong mẫu: đến 2023-12-31 · JP225 · M15 | 36.1% | 28.2% |
| Trong mẫu: đến 2023-12-31 · JP225 · H1 | 36.0% | 28.1% |
| Trong mẫu: đến 2023-12-31 · JP225 · H4 | 35.4% | 27.7% |
| Trong mẫu: đến 2023-12-31 · JP225 · D1 | 32.0% | 21.6% |
| Trong mẫu: đến 2023-12-31 · NAS100 · M15 | 34.1% | 25.8% |
| Trong mẫu: đến 2023-12-31 · NAS100 · H1 | 32.7% | 25.3% |
| Trong mẫu: đến 2023-12-31 · NAS100 · H4 | 33.0% | 24.8% |
| Trong mẫu: đến 2023-12-31 · NAS100 · D1 | 30.9% | 25.9% |
| Trong mẫu: đến 2023-12-31 · NZDUSD · M15 | 27.2% | 20.4% |
| Trong mẫu: đến 2023-12-31 · NZDUSD · H1 | 34.5% | 26.4% |
| Trong mẫu: đến 2023-12-31 · NZDUSD · H4 | 31.6% | 23.5% |
| Trong mẫu: đến 2023-12-31 · NZDUSD · D1 | 35.2% | 26.9% |
| Trong mẫu: đến 2023-12-31 · SOLUSD · H1 | 35.4% | 25.5% |
| Trong mẫu: đến 2023-12-31 · SOLUSD · H4 | 38.4% | 33.7% |
| Trong mẫu: đến 2023-12-31 · UK100 · M15 | 30.4% | 23.1% |
| Trong mẫu: đến 2023-12-31 · UK100 · H1 | 30.6% | 23.8% |
| Trong mẫu: đến 2023-12-31 · UK100 · H4 | 32.6% | 22.6% |
| Trong mẫu: đến 2023-12-31 · UK100 · D1 | 27.3% | 16.7% |
| Trong mẫu: đến 2023-12-31 · US30 · M15 | 30.7% | 22.0% |
| Trong mẫu: đến 2023-12-31 · US30 · H1 | 32.5% | 23.9% |
| Trong mẫu: đến 2023-12-31 · US30 · H4 | 36.2% | 25.9% |
| Trong mẫu: đến 2023-12-31 · US30 · D1 | 28.7% | 19.7% |
| Trong mẫu: đến 2023-12-31 · US500 · M15 | 31.2% | 22.6% |
| Trong mẫu: đến 2023-12-31 · US500 · H1 | 33.4% | 25.8% |
| Trong mẫu: đến 2023-12-31 · US500 · H4 | 32.3% | 25.6% |
| Trong mẫu: đến 2023-12-31 · US500 · D1 | 31.4% | 25.0% |
| Trong mẫu: đến 2023-12-31 · USDCAD · M15 | 28.2% | 22.3% |
| Trong mẫu: đến 2023-12-31 · USDCAD · H1 | 30.7% | 23.1% |
| Trong mẫu: đến 2023-12-31 · USDCAD · H4 | 32.9% | 24.1% |
| Trong mẫu: đến 2023-12-31 · USDCAD · D1 | 32.4% | 21.3% |
| Trong mẫu: đến 2023-12-31 · USDCHF · M15 | 25.8% | 18.9% |
| Trong mẫu: đến 2023-12-31 · USDCHF · H1 | 32.5% | 23.4% |
| Trong mẫu: đến 2023-12-31 · USDCHF · H4 | 35.5% | 26.8% |
| Trong mẫu: đến 2023-12-31 · USDCHF · D1 | 28.7% | 21.3% |
| Trong mẫu: đến 2023-12-31 · USDJPY · M15 | 29.3% | 22.7% |
| Trong mẫu: đến 2023-12-31 · USDJPY · H1 | 33.1% | 25.1% |
| Trong mẫu: đến 2023-12-31 · USDJPY · H4 | 33.2% | 24.6% |
| Trong mẫu: đến 2023-12-31 · USDJPY · D1 | 28.3% | 21.9% |
| Trong mẫu: đến 2023-12-31 · WTI · M15 | 32.0% | 22.9% |
| Trong mẫu: đến 2023-12-31 · WTI · H1 | 33.5% | 25.5% |
| Trong mẫu: đến 2023-12-31 · WTI · H4 | 33.8% | 25.2% |
| Trong mẫu: đến 2023-12-31 · WTI · D1 | 39.1% | 23.6% |
| Trong mẫu: đến 2023-12-31 · XAGUSD · M15 | 28.8% | 20.8% |
| Trong mẫu: đến 2023-12-31 · XAGUSD · H1 | 28.3% | 21.2% |
| Trong mẫu: đến 2023-12-31 · XAGUSD · H4 | 30.2% | 22.7% |
| Trong mẫu: đến 2023-12-31 · XAGUSD · D1 | 40.6% | 26.6% |
| Trong mẫu: đến 2023-12-31 · XAUUSD · M15 | 31.4% | 23.5% |
| Trong mẫu: đến 2023-12-31 · XAUUSD · H1 | 34.7% | 26.9% |
| Trong mẫu: đến 2023-12-31 · XAUUSD · H4 | 33.9% | 26.1% |
| Trong mẫu: đến 2023-12-31 · XAUUSD · D1 | 36.1% | 28.6% |
Thế nào là thắng
- W1: chạm chốt lời trước cắt lỗ. Cắt lỗ = 1,5 × ATR(14) Wilder của nến tín hiệu; chốt lời hiển thị = 1 × cắt lỗ (1:1). Vào lệnh tại giá đóng nến tín hiệu. Lệnh mua trả spread khi vào, lệnh bán trả spread khi thoát. Nếu cắt lỗ và chốt lời cùng xảy ra trong một nến M15, tính là thua. Không có kết quả trong 200 nến thì không tính.
- W2 đo hướng giá sau 5, 10 và 20 nến.
- Đầu vào mặc định yêu cầu hội tụ ≥ 4/7.
- Trong mẫu: từ nến đầu đến 2023-12-31; ngoài mẫu: 2024-01-01 đến 2026-11-16.
- Chi phí: Spread thực tế của tài khoản MT5 dạng ECN, commission 0.
- Nguồn dữ liệu: Tick data MT5 (BNB: Binance spot).
- Ô có ít hơn 30 tín hiệu hiển thị –.
Nến H4/D1 của TradingView có thể chia theo múi giờ của sàn trên TradingView, khác giờ máy chủ MT5 (UTC) dùng khi đo; phiên và xu hướng H4 trên bản Pine có thể lệch. Chưa kiểm cùng tín hiệu trên TradingView.
Mũi tên hiển thị tỷ lệ đã đo theo từng thị trường.
Nâng cấp so với bản gốc
- MT5 không có Range Filter trong bộ chỉ báo chuẩn. Các bản Range Filter trên TradingView không ghi xác suất thắng đã đo cho từng tín hiệu.
- Mỗi mũi tên ghi tỷ lệ thắng đã đo, ví dụ "Buy 1:1 51% (n=1118)" cho XAUUSD H1 lệnh Mua. Đo trên 20 mã MT5 + BNB, khung M15–D1, tách trong mẫu / ngoài mẫu.
- Tín hiệu chỉ trên nến đã đóng, đã kiểm không vẽ lại trong tester; điểm hợp lưu 7 yếu tố, mặc định chỉ hiện tín hiệu ≥ 4/7.
- Gợi ý SL/TP theo ATR, % theo từng nến (bar odds), buffer chuẩn cho EA, cảnh báo một lần mỗi nến đóng.
- Với vàng: panel GII và bộ lọc cùng chiều GII (tắt mặc định vì GII chưa kiểm chứng).
Thống kê kiểm thử quá khứ không bảo đảm kết quả tương lai.