Thứ Tư, 02/12/202602/12/2026

Hướng Dẫn Sử Dụng Bot CNPS81 - Inside Bar Breakout cho VN30F1M

Bot CNPS81 giao dịch phá vỡ mô hình Inside Bar trên VN30F1M, kết hợp đệm ATR, bộ lọc xu hướng EMA 50 và quản trị SL/TP cố định tỷ lệ 1:3, đóng lệnh cuối phiên.

Hướng dẫn sử dụng Bot CNPS81 cho VN30F1M
Hướng dẫn sử dụng Bot CNPS81 cho VN30F1M
Mục lục
Mục lục

Trong giao dịch hợp đồng tương lai VN30F1M, thị trường thường xuyên xuất hiện các giai đoạn tích lũy biên độ hẹp sau một nhịp biến động mạnh, trước khi bứt phá theo xu hướng mới. Nếu vào lệnh quá sớm khi giá chưa thoát khỏi vùng nén, nhà giao dịch rất dễ dính bẫy quét hai đầu (whipsaw); ngược lại, nếu vào lệnh muộn khi giá đã chạy xa, tỷ lệ R:R lại không còn hấp dẫn.

CNPS81 INSIDE BAR BREAKOUT (viết bằng Pine Script v6 trên TradingView) được thiết kế để giải quyết chính xác bài toán này bằng cách tự động hóa hoàn toàn quy trình nhận diện mô hình nến nén Inside Bar – Mother Bar, chờ tín hiệu phá vỡ có xác nhận trên nến đã đóng và kiểm soát rủi ro chặt chẽ trong phiên.

Những điểm nổi bật cốt lõi của Bot CNPS81:

  • Không repaint, chỉ xử lý trên nến đã đóng (barstate.isconfirmed): Mọi tín hiệu nhận diện Inside Bar, phá vỡ Mother Bar và vào/thoát lệnh đều chạy trên nến xác nhận hoàn chỉnh.
  • Xác nhận Breakout thông minh với bộ đệm ATR: Yêu cầu giá đóng cửa vượt đỉnh/đáy Mother Bar cộng thêm khoảng đệm 0.05 * ATR(14) và đúng chiều nến bứt phá để hạn chế phá vỡ giả.
  • Lọc xu hướng đa tầng linh hoạt: Tích hợp sẵn bộ lọc EMA 50 (kèm độ dốc EMA và vị thế giá so với EMA), cùng các bộ lọc tùy chọn ADX, Volume và H1 EMA Bias.
  • Quản trị rủi ro kỷ luật trong ngày: Cố định Stop Loss 5.0 điểm – Take Profit 15.0 điểm (R:R 1:3), giới hạn tối đa 2 lệnh/ngày, có thời gian nghỉ (Cooldown 3 nến) sau thoát lệnh và tự động đóng toàn bộ vị thế trước giờ ATC (14:45).

1. CNPS81 Inside Bar Breakout là gì?

CNPS81 là chiến lược giao dịch theo mô hình hành động giá Inside Bar Breakout kết hợp bộ lọc xu hướng và quản trị vị thế trong ngày (Intraday). Hệ thống vận hành dựa trên 4 trụ cột kỹ thuật chính:

  1. Nhận diện vùng nén giá (Inside Bar & Mother Bar): Tìm kiếm cây nến hiện tại nằm gọn trong biên độ của cây nến liền trước (Mother Bar), đồng thời kiểm soát độ rộng Mother Bar theo ATR để tránh các vùng nhiễu quá nhỏ hoặc nến biến động quá lớn bất thường.
  2. Xác nhận phá vỡ có giới hạn thời gian (Breakout Window & ATR Buffer): Lưu giữ vùng giá Mother High / Mother Low và chỉ cho phép kích hoạt tín hiệu phá vỡ trong tối đa 5 nến kế tiếp, có cộng thêm đệm ATR và kiểm tra hướng nến Breakout.
  3. Bộ lọc xu hướng và động lượng: Mặc định sử dụng EMA 50 (xét cả độ dốc trong 3 nến và vị trí giá đóng cửa) để chỉ đánh thuận xu hướng; ngoài ra cho phép bật thêm ADX, Volume và H1 EMA Bias khi cần siết chặt chất lượng tín hiệu.
  4. Kiểm soát phiên và bảo vệ vốn: Chỉ mở lệnh mới trong khung giờ 09:15 – 14:15 (giờ Việt Nam), giới hạn số lệnh mỗi ngày, áp dụng Cooldown sau khi đóng lệnh, cố định SL/TP theo điểm và cưỡng chế đóng lệnh lúc 14:45.

Bảng thông số mặc định

Nhóm thông sốTên tham số trong CodeGiá trị mặc địnhÝ nghĩa
01. Inside BarstrictInsidetrueYêu cầu nến Inside nằm hoàn toàn trong Mother Bar (high < high[1] và low > low[1])
minimumMotherATR0.0Biên độ Mother Bar tối thiểu theo bội số ATR
maximumMotherATR4.0Biên độ Mother Bar tối đa theo bội số ATR
useMaximumInsideRatiofalseBật/tắt giới hạn tỷ lệ biên độ Inside Bar / Mother Bar
maximumInsideRatio0.75Tỷ lệ biên độ Inside / Mother tối đa cho phép
atrLength14Chu kỳ tính chỉ báo ATR
02. BreakoutbreakoutWindow5Số nến tối đa chờ phá vỡ sau khi hình thành Inside Bar
useBreakoutBuffertrueBật/tắt khoảng đệm ATR khi xác nhận Breakout
breakoutBufferATR0.05Hệ số đệm Breakout theo ATR
requireBreakoutCandletrueYêu cầu nến Breakout phải là nến tăng (Long) hoặc giảm (Short)
requireBreakoutBodyfalseBật/tắt điều kiện tỷ lệ thân nến tối thiểu
minimumBodyRatio0.40Tỷ lệ thân nến / biên độ nến tối thiểu
03. EMA TrenduseEMAFiltertrueBật/tắt bộ lọc xu hướng EMA
emaLength50Chu kỳ đường EMA xu hướng
emaSlopeBars3Số nến nhìn lại để xác định độ dốc EMA
requirePriceEMAtrueYêu cầu giá đóng cửa nằm trên (Long) / dưới (Short) EMA
04. Optional FiltersuseADXFilterfalseBật/tắt bộ lọc sức mạnh xu hướng ADX
diLength / adxSmoothing14 / 14Chu kỳ DI và làm mượt ADX
minimumADX18.0Ngưỡng ADX tối thiểu
useVolumeFilterfalseBật/tắt bộ lọc xác nhận khối lượng
volumeLength / volumeFactor20 / 1.10Chu kỳ trung bình Volume và hệ số nhân tối thiểu
05. H1 BiasuseH1BiasfalseBật/tắt bộ lọc xu hướng khung H1 (60 phút)
h1EMALength50Chu kỳ EMA trên khung H1
06. Risk ManagementstopLossPoints5.0Mức cắt lỗ cố định (điểm)
takeProfitPoints15.0Mức chốt lời cố định (điểm)
useTimeExitfalseBật/tắt cơ chế thoát lệnh theo thời gian nắm giữ
maximumHoldingBars20Số nến nắm giữ tối đa trước khi đóng lệnh
07. Trade ControltradeDirection"Long"Chiều giao dịch cho phép (Long, Short, Both)
contracts3Tham số số lượng hợp đồng cấu hình trong mục Trade Control
maxTradesPerDay2Số lệnh tối đa được phép mở trong một ngày
cooldownBars3Số nến nghỉ bắt buộc sau khi đóng một lệnh
08. SessionuseSessionFiltertrueBật/tắt lọc khung giờ giao dịch (Asia/Ho_Chi_Minh)
startHour / startMinute9 / 15Giờ bắt đầu cho phép tìm lệnh (09:15)
lastHour / lastMinute14 / 15Giờ cuối cùng nhận lệnh mới (14:15)
endHour / endMinute14 / 45Giờ cưỡng chế đóng toàn bộ vị thế (14:45)
09. Alerts & 10. DisplaydisableExitAlertsfalseTắt cảnh báo SL/TP nếu đặt true
showDiagnosticsfalseBật/tắt bảng chẩn đoán ở góc trên bên phải

Source Code CNPS81 Inside Bar Breakout

Bạn có thể sao chép toàn bộ mã nguồn Pine Script v6 dưới đây để dán trực tiếp vào Pine Editor trên TradingView:

//@version=6
strategy(title="CNPS81 INSIDE BAR BREAKOUT", shorttitle="CNPS81 IB BREAK", overlay=true, initial_capital=100000000, default_qty_type=strategy.fixed, default_qty_value=1, pyramiding=0, margin_long=0, margin_short=0, slippage=0, commission_type=strategy.commission.cash_per_contract, commission_value=0, fill_orders_on_standard_ohlc=true, process_orders_on_close=true, calc_on_order_fills=false, max_labels_count=300, max_lines_count=300, max_bars_back=5000)

// ============================================================
// CNPS81 - INSIDE BAR BREAKOUT
//
// Mother Bar = previous candle
// Inside Bar = current candle fully inside Mother Bar
//
// LONG:
// 1. Detect Inside Bar
// 2. Save Mother Bar High/Low
// 3. Wait for close above Mother Bar High
// 4. Confirm filters
// 5. LONG
//
// SHORT: Inverse conditions
//
// Uses closed candles only.
// No repainting pivot logic.
// ============================================================
// ============================================================
// 01. INSIDE BAR DETECTION
// ============================================================
gInside = "01. Inside Bar"
strictInside = input.bool(true, "Require Strict Inside Bar", group=gInside)
minimumMotherATR = input.float(0.0, "Minimum Mother Bar Range / ATR", minval=0.0, step=0.1, group=gInside)
maximumMotherATR = input.float(4.0, "Maximum Mother Bar Range / ATR", minval=0.1, step=0.1, group=gInside)
useMaximumInsideRatio = input.bool(false, "Limit Inside Bar / Mother Bar Ratio", group=gInside)
maximumInsideRatio = input.float(0.75, "Maximum Inside/Mother Range", minval=0.05, maxval=1.0, step=0.05, group=gInside)
atrLength = input.int(14, "ATR Length", minval=1, group=gInside)

// ============================================================
// 02. BREAKOUT CONFIRMATION
// ============================================================
gBreakout = "02. Breakout"
breakoutWindow = input.int(5, "Maximum Breakout Window", minval=1, maxval=30, group=gBreakout)
useBreakoutBuffer = input.bool(true, "Use Breakout Buffer", group=gBreakout)
breakoutBufferATR = input.float(0.05, "Breakout Buffer / ATR", minval=0.0, step=0.05, group=gBreakout)
requireBreakoutCandle = input.bool(true, "Require Breakout Candle Direction", group=gBreakout)
requireBreakoutBody = input.bool(false, "Require Minimum Breakout Body", group=gBreakout)
minimumBodyRatio = input.float(0.40, "Minimum Body / Candle Range", minval=0.0, maxval=1.0, step=0.05, group=gBreakout)

// ============================================================
// 03. EMA TREND FILTER
// ============================================================
gTrend = "03. EMA Trend"
useEMAFilter = input.bool(true, "Use EMA Trend Filter", group=gTrend)
emaLength = input.int(50, "EMA Length", minval=5, group=gTrend)
emaSlopeBars = input.int(3, "EMA Slope Lookback", minval=1, maxval=50, group=gTrend)
requirePriceEMA = input.bool(true, "Require Price Above/Below EMA", group=gTrend)

// ============================================================
// 04. ADX AND VOLUME
// ============================================================
gFilters = "04. Optional Filters"
useADXFilter = input.bool(false, "Use Minimum ADX Filter", group=gFilters)
diLength = input.int(14, "DI Length", minval=2, group=gFilters)
adxSmoothing = input.int(14, "ADX Smoothing", minval=2, group=gFilters)
minimumADX = input.float(18.0, "Minimum ADX", minval=1.0, step=1.0, group=gFilters)
useVolumeFilter = input.bool(false, "Require Volume Confirmation", group=gFilters)
volumeLength = input.int(20, "Volume Average Length", minval=2, group=gFilters)
volumeFactor = input.float(1.10, "Volume Factor", minval=0.1, step=0.1, group=gFilters)

// ============================================================
// 05. H1 BIAS
// ============================================================
gH1 = "05. H1 Bias"
useH1Bias = input.bool(false, "Use Confirmed H1 EMA Bias", group=gH1)
h1EMALength = input.int(50, "H1 EMA Length", minval=1, group=gH1)

// ============================================================
// 06. RISK MANAGEMENT
// ============================================================
gRisk = "06. Risk Management"
stopLossPoints = input.float(5.0, "Stop Loss (Points)", minval=0.1, step=0.5, group=gRisk)
takeProfitPoints = input.float(15.0, "Take Profit (Points)", minval=0.1, step=0.5, group=gRisk)
useTimeExit = input.bool(false, "Use Time Exit", group=gRisk)
maximumHoldingBars = input.int(20, "Maximum Holding Bars", minval=1, maxval=300, group=gRisk)

// ============================================================
// 07. TRADE CONTROL
// ============================================================
gTrade = "07. Trade Control"
tradeDirection = input.string("Long", "Trade Direction", options=["Long", "Short", "Both"], group=gTrade)
contracts = input.int(3, "Contracts", minval=1, maxval=100, group=gTrade)
maxTradesPerDay = input.int(2, "Maximum Trades Per Day", minval=1, maxval=20, group=gTrade)
cooldownBars = input.int(3, "Cooldown After Exit (Bars)", minval=0, maxval=100, group=gTrade)
bool allowLong = (tradeDirection == "Long" or tradeDirection == "Both")
bool allowShort = (tradeDirection == "Short" or tradeDirection == "Both")

// ============================================================
// 08. TRADING SESSION
// ============================================================
gSession = "08. Session"
useSessionFilter = input.bool(true, "Use Entry Session Filter", group=gSession)
tz = input.string("Asia/Ho_Chi_Minh", "Timezone", group=gSession)
startHour = input.int(9, "Entry Start Hour", minval=0, maxval=23, group=gSession)
startMinute = input.int(15, "Entry Start Minute", minval=0, maxval=59, group=gSession)
lastHour = input.int(14, "Last Entry Hour", minval=0, maxval=23, group=gSession)
lastMinute = input.int(15, "Last Entry Minute", minval=0, maxval=59, group=gSession)
endHour = input.int(14, "Force Close Hour", minval=0, maxval=23, group=gSession)
endMinute = input.int(45, "Force Close Minute", minval=0, maxval=59, group=gSession)

// ============================================================
// 09. ALERTS
// ============================================================
gAlerts = "09. Alerts"
disableExitAlerts = input.bool(false, "Disable SL/TP Alerts", group=gAlerts)

// ============================================================
// 10. DISPLAY
// ============================================================
gDisplay = "10. Display"
showEMA = input.bool(true, "Show EMA", group=gDisplay)
showInsideBars = input.bool(true, "Show Inside Bar Markers", group=gDisplay)
showMotherLevels = input.bool(true, "Show Active Mother Bar Levels", group=gDisplay)
showBreakoutMarkers = input.bool(true, "Show Breakout Markers", group=gDisplay)
showEntries = input.bool(true, "Show Entry Markers", group=gDisplay)
showSLTP = input.bool(true, "Show SL/TP", group=gDisplay)
showDiagnostics = input.bool(false, "Show Diagnostics", group=gDisplay)

// ============================================================
// 11. TIME ENGINE
// ============================================================
int openMin = (hour(time, tz) * 60 + minute(time, tz))
int closeMin = (hour(time_close, tz) * 60 + minute(time_close, tz))
int entryStart = (startHour * 60 + startMinute)
int entryLast = (lastHour * 60 + lastMinute)
int forceCloseMin = (endHour * 60 + endMinute)
bool sessionOK = (not useSessionFilter or (openMin >= entryStart and closeMin <= entryLast))
bool beforeClose = (closeMin < forceCloseMin)
bool forceCloseBar = (openMin < forceCloseMin and closeMin >= forceCloseMin)
bool intradayOK = timeframe.isintraday

// ============================================================
// 12. DAILY COUNTER
// ============================================================
int dayKey = (year(time, tz) * 10000 + month(time, tz) * 100 + dayofmonth(time, tz))
bool newDay = (na(dayKey[1]) or dayKey != dayKey[1])
var int tradesToday = 0
if newDay
    tradesToday := 0

// ============================================================
// 13. ATR
// ============================================================
float atr = ta.atr(atrLength)

// ============================================================
// 14. CANDLE ANATOMY
// ============================================================
float candleRange = high - low
float candleBody = math.abs(close - open)
float bodyRatio = (candleRange > 0 ? candleBody / candleRange : 0.0)
bool bullishCandle = close > open
bool bearishCandle = close < open

// ============================================================
// 15. INSIDE BAR DETECTION
// ============================================================
//
// Mother Bar is candle [1].
// Current candle is the Inside Bar.
//
// Strict:
// high < high[1] and low > low[1]
//
// Non-strict:
// high <= high[1] and low >= low[1]
// with at least one boundary different.
//
// ============================================================
bool strictIB = (high < high[1] and low > low[1])
bool looseIB = (high <= high[1] and low >= low[1] and (high < high[1] or low > low[1]))
bool insidePattern = (strictInside ? strictIB : looseIB)
float motherRange = (high[1] - low[1])
float insideRange = (high - low)
float insideRatio = (motherRange > 0 ? insideRange / motherRange : na)
bool motherRangeOK = (not na(atr[1]) and atr[1] > 0 and motherRange >= minimumMotherATR * atr[1] and motherRange <= maximumMotherATR * atr[1])
bool insideRatioOK = (not useMaximumInsideRatio or (not na(insideRatio) and insideRatio <= maximumInsideRatio))
bool insideBar = (barstate.isconfirmed and insidePattern and motherRangeOK and insideRatioOK)

// ============================================================
// 16. EMA TREND
// ============================================================
float ema = ta.ema(close, emaLength)
bool emaUp = (not na(ema[emaSlopeBars]) and ema > ema[emaSlopeBars])
bool emaDown = (not na(ema[emaSlopeBars]) and ema < ema[emaSlopeBars])
bool longTrendOK = (not useEMAFilter or (emaUp and (not requirePriceEMA or close > ema)))
bool shortTrendOK = (not useEMAFilter or (emaDown and (not requirePriceEMA or close < ema)))

// ============================================================
// 17. ADX FILTER
// ============================================================
[diPlus, diMinus, adx] = ta.dmi(diLength, adxSmoothing)
bool adxOK = (not useADXFilter or (not na(adx) and adx >= minimumADX))

// ============================================================
// 18. VOLUME FILTER
// ============================================================
float avgVolume = ta.sma(volume, volumeLength)
bool volumeOK = (not useVolumeFilter or (not na(volume) and not na(avgVolume) and volume >= avgVolume * volumeFactor))

// ============================================================
// 19. CONFIRMED H1 BIAS
// ============================================================
float h1EMA = request.security(syminfo.tickerid, "60", ta.ema(close, h1EMALength)[1], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
float h1Close = request.security(syminfo.tickerid, "60", close[1], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
bool validH1Chart = (timeframe.isintraday and timeframe.in_seconds() < 3600)
bool longH1OK = (not useH1Bias or (validH1Chart and not na(h1EMA) and not na(h1Close) and h1Close > h1EMA))
bool shortH1OK = (not useH1Bias or (validH1Chart and not na(h1EMA) and not na(h1Close) and h1Close < h1EMA))

// ============================================================
// 20. POSITION / COOLDOWN
// ============================================================
bool flat = strategy.position_size == 0
bool inLong = strategy.position_size > 0
bool inShort = strategy.position_size < 0
var int lastExitBar = na
bool closedTradeNow = (strategy.closedtrades > nz(strategy.closedtrades[1], 0))
if closedTradeNow
    lastExitBar := bar_index
bool cooldownOK = (na(lastExitBar) or bar_index - lastExitBar > cooldownBars)

// ============================================================
// 21. INSIDE BAR STATE
// ============================================================
//
// Save Mother Bar High/Low when an Inside Bar
// forms on a confirmed candle.
//
// Do not overwrite active patterns.
// The same pattern can trigger only once.
//
// ============================================================
var bool pendingBreakout = false
var int insideBarIndex = na
var float motherHigh = na
var float motherLow = na
var int insideBarCount = 0
var int bullBreakoutCount = 0
var int bearBreakoutCount = 0
var int expiredCount = 0
bool patternActive = (pendingBreakout and not na(insideBarIndex) and not na(motherHigh) and not na(motherLow))
bool breakoutWindowOK = (patternActive and bar_index > insideBarIndex and bar_index - insideBarIndex <= breakoutWindow)

// ============================================================
// 22. BREAKOUT CONDITIONS
// ============================================================
float breakBuffer = (useBreakoutBuffer ? atr * breakoutBufferATR : 0.0)
bool bullBreakout = (barstate.isconfirmed and breakoutWindowOK and close > motherHigh + breakBuffer)
bool bearBreakout = (barstate.isconfirmed and breakoutWindowOK and close < motherLow - breakBuffer)
bool bullCandleOK = (not requireBreakoutCandle or bullishCandle)
bool bearCandleOK = (not requireBreakoutCandle or bearishCandle)
bool breakoutBodyOK = (not requireBreakoutBody or bodyRatio >= minimumBodyRatio)
bool longBase = (bullBreakout and bullCandleOK and breakoutBodyOK)
bool shortBase = (bearBreakout and bearCandleOK and breakoutBodyOK)

// ============================================================
// 23. FILTERED SIGNALS
// ============================================================
bool rawLong = (longBase and longTrendOK and adxOK and volumeOK and longH1OK)
bool rawShort = (shortBase and shortTrendOK and adxOK and volumeOK and shortH1OK)

// ============================================================
// 24. ENTRY GATES
// ============================================================
var int lastEntryBar = na
bool freshEntryBar = (na(lastEntryBar) or lastEntryBar != bar_index)
bool canTrade = (barstate.isconfirmed and intradayOK and flat and strategy.opentrades == 0 and tradesToday < maxTradesPerDay and cooldownOK and sessionOK and beforeClose and freshEntryBar)
bool enterLong = (canTrade and allowLong and rawLong)
bool enterShort = (canTrade and allowShort and rawShort)

// ============================================================
// 25. DIAGNOSTIC COUNTERS
// ============================================================
var int longBaseCount = 0
var int shortBaseCount = 0
var int filteredLongCount = 0
var int filteredShortCount = 0
var int longEntryCount = 0
var int shortEntryCount = 0

// ============================================================
// 26. SL / TP IN TICKS
// ============================================================
int slTicks = math.max(1, int(math.round(stopLossPoints / syminfo.mintick)))
int tpTicks = math.max(1, int(math.round(takeProfitPoints / syminfo.mintick)))
float effectiveSL = slTicks * syminfo.mintick
float effectiveTP = tpTicks * syminfo.mintick

// ============================================================
// 27. LONG ENTRY
// ============================================================
if enterLong
    strategy.entry("Long", strategy.long, comment="Inside Bar Bull Breakout", alert_message="🟢 VÀO VỊ THẾ LONG (CNPS81)\\n🎯 Giá vào: " + str.tostring(close, format.mintick) + "\\n🛑 Cắt lỗ (SL): " + str.tostring(close - effectiveSL, format.mintick) + "\\n💰 Chốt lời (TP): " + str.tostring(close + effectiveTP, format.mintick))
    tradesToday += 1
    longEntryCount += 1
    lastEntryBar := bar_index

// ============================================================
// 28. SHORT ENTRY
// ============================================================
if enterShort
    strategy.entry("Short", strategy.short, comment="Inside Bar Bear Breakout", alert_message="🔴 VÀO VỊ THẾ SHORT (CNPS81)\\n🎯 Giá vào: " + str.tostring(close, format.mintick) + "\\n🛑 Cắt lỗ (SL): " + str.tostring(close + effectiveSL, format.mintick) + "\\n💰 Chốt lời (TP): " + str.tostring(close - effectiveTP, format.mintick))
    tradesToday += 1
    shortEntryCount += 1
    lastEntryBar := bar_index

// ============================================================
// 29. UPDATE PATTERN STATE
// ============================================================
//
// All signals above use the pattern saved
// before this update.
//
// Order:
// 1. Count signals.
// 2. Consume breakout or expire old pattern.
// 3. Register new inside bar only when flat.
//
// ============================================================
if barstate.isconfirmed
    if longBase
        longBaseCount += 1
    if shortBase
        shortBaseCount += 1
    if rawLong
        filteredLongCount += 1
    if rawShort
        filteredShortCount += 1
    if bullBreakout
        bullBreakoutCount += 1
    if bearBreakout
        bearBreakoutCount += 1
    bool patternExpired = (patternActive and bar_index - insideBarIndex > breakoutWindow)
    bool patternResolved = (bullBreakout or bearBreakout)
    if newDay or patternExpired or patternResolved
        if patternExpired
            expiredCount += 1
        pendingBreakout := false
        insideBarIndex := na
        motherHigh := na
        motherLow := na

    // Only register a fresh Inside Bar if
    // no active pattern exists.
    // Do not arm a pattern on the same bar
    // that already resolved a breakout.
    if (insideBar and not pendingBreakout and not patternResolved and flat and beforeClose and intradayOK)
        pendingBreakout := true
        insideBarIndex := bar_index
        motherHigh := high[1]
        motherLow := low[1]
        insideBarCount += 1

// ============================================================
// 30. LONG SL / TP
// ============================================================
strategy.exit("Long Exit", from_entry="Long", profit=tpTicks, loss=slTicks, comment_profit="TP Long", comment_loss="SL Long", alert_profit="💰 CHỐT LỜI LONG (CNPS81 - TP HIT)\\n🎯 Giá chốt lời: " + str.tostring(strategy.position_avg_price + effectiveTP, format.mintick), alert_loss="🛑 CẮT LỖ LONG (CNPS81 - SL HIT)\\n💥 Giá cắt lỗ: " + str.tostring(strategy.position_avg_price - effectiveSL, format.mintick), disable_alert=disableExitAlerts)

// ============================================================
// 31. SHORT SL / TP
// ============================================================
strategy.exit("Short Exit", from_entry="Short", profit=tpTicks, loss=slTicks, comment_profit="TP Short", comment_loss="SL Short", alert_profit="💰 CHỐT LỜI SHORT (CNPS81 - TP HIT)\\n🎯 Giá chốt lời: " + str.tostring(strategy.position_avg_price - effectiveTP, format.mintick), alert_loss="🛑 CẮT LỖ SHORT (CNPS81 - SL HIT)\\n💥 Giá cắt lỗ: " + str.tostring(strategy.position_avg_price + effectiveSL, format.mintick), disable_alert=disableExitAlerts)

// ============================================================
// 32. OPTIONAL TIME EXIT
// ============================================================
int barsHeld = (strategy.opentrades > 0 ? bar_index - strategy.opentrades.entry_bar_index(0) : 0)
bool timeExit = (useTimeExit and strategy.position_size != 0 and barsHeld >= maximumHoldingBars and barstate.isconfirmed)
if timeExit and not forceCloseBar
    strategy.close_all(immediately=true, comment="Time Exit", alert_message="⏱️ ĐÓNG VỊ THẾ HẾT THỜI GIAN (CNPS81 - Time Exit)\\n📌 Giá đóng: " + str.tostring(close, format.mintick))

// ============================================================
// 33. SESSION END
// ============================================================
if (barstate.isconfirmed and forceCloseBar and strategy.position_size != 0)
    strategy.close_all(immediately=true, comment="Session End", alert_message="⏰ ĐÓNG VỊ THẾ HẾT PHIÊN (CNPS81 - Session End)\\n📌 Giá đóng: " + str.tostring(close, format.mintick))

// ============================================================
// 34. EMA PLOT
// ============================================================
plot(showEMA ? ema : na, title="EMA Trend", color=color.orange, linewidth=2)

// ============================================================
// 35. MOTHER BAR LEVELS
// ============================================================
plot(showMotherLevels and pendingBreakout ? motherHigh : na, title="Mother Bar High", color=color.aqua, linewidth=2, style=plot.style_linebr)
plot(showMotherLevels and pendingBreakout ? motherLow : na, title="Mother Bar Low", color=color.fuchsia, linewidth=2, style=plot.style_linebr)

// ============================================================
// 36. INSIDE BAR MARKERS
// ============================================================
plotshape(showInsideBars and insideBar, title="Inside Bar", style=shape.circle, location=location.belowbar, color=color.yellow, size=size.tiny, text="IB")

// ============================================================
// 37. BREAKOUT MARKERS
// ============================================================
plotshape(showBreakoutMarkers and bullBreakout, title="Bullish Inside Bar Breakout", style=shape.circle, location=location.belowbar, color=color.aqua, size=size.tiny, text="BO")
plotshape(showBreakoutMarkers and bearBreakout, title="Bearish Inside Bar Breakout", style=shape.circle, location=location.abovebar, color=color.fuchsia, size=size.tiny, text="BO")

// ============================================================
// 38. ENTRY MARKERS
// ============================================================
plotshape(showEntries and enterLong, title="CNPS81 LONG", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="LONG", textcolor=color.white)
plotshape(showEntries and enterShort, title="CNPS81 SHORT", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="SHORT", textcolor=color.white)

// ============================================================
// 39. ACTIVE SL / TP
// ============================================================
float longSL = (inLong ? strategy.position_avg_price - effectiveSL : na)
float longTP = (inLong ? strategy.position_avg_price + effectiveTP : na)
float shortSL = (inShort ? strategy.position_avg_price + effectiveSL : na)
float shortTP = (inShort ? strategy.position_avg_price - effectiveTP : na)
plot(showSLTP ? longSL : na, title="Long SL", color=color.red, linewidth=2, style=plot.style_linebr)
plot(showSLTP ? longTP : na, title="Long TP", color=color.green, linewidth=2, style=plot.style_linebr)
plot(showSLTP ? shortSL : na, title="Short SL", color=color.red, linewidth=2, style=plot.style_linebr)
plot(showSLTP ? shortTP : na, title="Short TP", color=color.green, linewidth=2, style=plot.style_linebr)

// ============================================================
// 40. DATA WINDOW
// ============================================================
plot(atr, title="ATR", color=color.gray, display=display.data_window)
plot(insideRatio, title="Inside/Mother Range Ratio", color=color.blue, display=display.data_window)
plot(adx, title="ADX", color=color.purple, display=display.data_window)

// ============================================================
// 41. DIAGNOSTICS TABLE
// ============================================================
var table diagnostics = table.new(position.top_right, 2, 18, border_width=1)
if showDiagnostics and barstate.islast
    table.cell(diagnostics, 0, 0, "CNPS81")
    table.cell(diagnostics, 1, 0, timeframe.period)
    table.cell(diagnostics, 0, 1, "Inside Bars")
    table.cell(diagnostics, 1, 1, str.tostring(insideBarCount))
    table.cell(diagnostics, 0, 2, "Bull Breakouts")
    table.cell(diagnostics, 1, 2, str.tostring(bullBreakoutCount))
    table.cell(diagnostics, 0, 3, "Bear Breakouts")
    table.cell(diagnostics, 1, 3, str.tostring(bearBreakoutCount))
    table.cell(diagnostics, 0, 4, "Expired Patterns")
    table.cell(diagnostics, 1, 4, str.tostring(expiredCount))
    table.cell(diagnostics, 0, 5, "Long Bases")
    table.cell(diagnostics, 1, 5, str.tostring(longBaseCount))
    table.cell(diagnostics, 0, 6, "Short Bases")
    table.cell(diagnostics, 1, 6, str.tostring(shortBaseCount))
    table.cell(diagnostics, 0, 7, "Filtered Long")
    table.cell(diagnostics, 1, 7, str.tostring(filteredLongCount))
    table.cell(diagnostics, 0, 8, "Filtered Short")
    table.cell(diagnostics, 1, 8, str.tostring(filteredShortCount))
    table.cell(diagnostics, 0, 9, "Long Entries")
    table.cell(diagnostics, 1, 9, str.tostring(longEntryCount))
    table.cell(diagnostics, 0, 10, "Short Entries")
    table.cell(diagnostics, 1, 10, str.tostring(shortEntryCount))
    table.cell(diagnostics, 0, 11, "Pattern Active")
    table.cell(diagnostics, 1, 11, pendingBreakout ? "YES" : "NO")
    table.cell(diagnostics, 0, 12, "Mother High")
    table.cell(diagnostics, 1, 12, str.tostring(motherHigh, format.mintick))
    table.cell(diagnostics, 0, 13, "Mother Low")
    table.cell(diagnostics, 1, 13, str.tostring(motherLow, format.mintick))
    table.cell(diagnostics, 0, 14, "EMA Up")
    table.cell(diagnostics, 1, 14, emaUp ? "YES" : "NO")
    table.cell(diagnostics, 0, 15, "EMA Down")
    table.cell(diagnostics, 1, 15, emaDown ? "YES" : "NO")
    table.cell(diagnostics, 0, 16, "Trades Today")
    table.cell(diagnostics, 1, 16, str.tostring(tradesToday) + "/" + str.tostring(maxTradesPerDay))
    table.cell(diagnostics, 0, 17, "Position")
    table.cell(diagnostics, 1, 17, inLong ? "LONG" : inShort ? "SHORT" : "FLAT")

2. Những khái niệm kỹ thuật cốt lõi trong CNPS81

2.1. Cấu trúc Mother Bar – Inside Bar và bộ lọc biên độ ATR

Bot xem nến liền trước ([1]) là Mother Bar và nến hiện tại là Inside Bar. Tùy vào tham số strictInside, điều kiện hình thành được chia thành 2 chế độ:

  • Strict Inside Bar (strictInside = true, mặc định): high < high[1] và low > low[1].
  • Non-strict Inside Bar (strictInside = false): high <= high[1] và low >= low[1], đồng thời có ít nhất một biên khác biệt (high < high[1] hoặc low > low[1]).

Để đảm bảo mẫu hình có ý nghĩa giao dịch, biên độ Mother Bar (motherRange = high[1] - low[1]) phải nằm trong dải chuẩn hóa theo atr[1] (ATR(14)):

  • motherRange >= minimumMotherATR * atr[1] (mặc định 0.0)
  • motherRange <= maximumMotherATR * atr[1] (mặc định 4.0)

Ngoài ra, nếu bật useMaximumInsideRatio, tỷ lệ insideRatio = (high - low) / motherRange không được vượt quá maximumInsideRatio (mặc định 0.75).

2.2. Cơ chế Breakout Window và Breakout Buffer theo ATR

Sau khi Inside Bar được xác nhận trên nến đóng (barstate.isconfirmed), bot lưu motherHigh = high[1] và motherLow = low[1] vào bộ nhớ trạng thái (pendingBreakout = true).

  • Cửa sổ thời gian (breakoutWindow): Tín hiệu phá vỡ chỉ hợp lệ trong phạm vi 1 đến 5 nến sau nến Inside Bar (bar_index - insideBarIndex <= breakoutWindow). Nếu quá 5 nến mà chưa có phá vỡ, mẫu hình tự động hết hiệu lực (patternExpired).
  • Bộ đệm phá vỡ (breakBuffer): Khi useBreakoutBuffer = true, mức phá vỡ được nới thêm atr * breakoutBufferATR (0.05 * ATR(14)):
    • Phá vỡ tăng (bullBreakout): close > motherHigh + breakBuffer
    • Phá vỡ giảm (bearBreakout): close < motherLow - breakBuffer
  • Xác nhận nến bứt phá: Mặc định requireBreakoutCandle = true yêu cầu nến Breakout phải đồng thuận hướng (close > open cho Long, close < open cho Short). Người dùng có thể bật thêm requireBreakoutBody để đòi hỏi bodyRatio >= 0.40.

2.3. Hệ thống bộ lọc xu hướng đa tầng (EMA, ADX, Volume, H1 Bias)

  • EMA Trend (useEMAFilter = true): Sử dụng EMA(50) trên khung biểu đồ hiện tại. Bot kiểm tra độ dốc EMA qua emaSlopeBars = 3 (ema > ema[3] cho chiều tăng, ema < ema[3] cho chiều giảm) và mặc định yêu cầu giá đóng cửa nằm cùng phía với EMA (close > ema hoặc close < ema).
  • ADX Filter (useADXFilter = false): Dùng ta.dmi(14, 14) để lọc nhiễu đi ngang bằng ngưỡng adx >= 18.0.
  • Volume Filter (useVolumeFilter = false): Yêu cầu volume >= ta.sma(volume, 20) * 1.10.
  • Confirmed H1 EMA Bias (useH1Bias = false): Khi chạy trên khung nhỏ hơn 1 giờ (timeframe.in_seconds() < 3600), bot lấy giá đóng cửa và EMA(50) của nến H1 đã đóng ([1]) để xác định thiên hướng khung lớn (h1Close > h1EMA cho Long, h1Close < h1EMA cho Short).

3. Nguyên lý hoạt động của CNPS81

Bot CNPS81 vận hành theo chu trình khép kín trên từng nến đã đóng (barstate.isconfirmed):

  1. Khởi tạo phiên mới (newDay): Khi bước sang ngày giao dịch mới theo múi giờ Asia/Ho_Chi_Minh, bộ đếm tradesToday được reset về 0 và mọi trạng thái mẫu hình dang dở từ ngày hôm trước bị hủy bỏ.
  2. Đánh giá Breakout của mẫu hình đang chờ: Nếu đang có pendingBreakout còn trong breakoutWindow, bot kiểm tra xem nến vừa đóng có tạo bullBreakout hoặc bearBreakout kèm điều kiện nến Breakout hay không.
  3. Lọc tín hiệu và kiểm tra cổng vào lệnh: Tín hiệu longBase / shortBase đi qua các bộ lọc EMA, ADX, Volume, H1 Bias để thành rawLong / rawShort, sau đó đối chiếu cổng canTrade (giờ phiên, giới hạn lệnh/ngày, Cooldown, trạng thái Flat) để gửi lệnh strategy.entry.
  4. Cập nhật trạng thái mẫu hình: Nếu mẫu hình vừa Breakout (patternResolved) hoặc quá hạn (patternExpired), bot xóa motherHigh / motherLow cũ. Ngược lại, nếu thị trường đang flat, chưa có mẫu hình nào đang chờ và xuất hiện Inside Bar mới trước giờ đóng cửa, bot ghi nhận mẫu hình mới.
  5. Quản trị và đóng vị thế: Khi đã có lệnh mở, strategy.exit tự động theo dõi SL/TP theo tick; đồng thời bot kiểm tra điều kiện Time Exit (nếu bật) và cưỡng chế đóng toàn bộ vị thế tại nến 14:45.

4. Điều kiện vào lệnh Long và Short của CNPS81

4.1. Điều kiện vào lệnh Long

Lệnh Long (enterLong) được kích hoạt khi thỏa mãn đồng thời toàn bộ các điều kiện sau:

  • Tham số tradeDirection là "Long" (mặc định) hoặc "Both" (allowLong = true).
  • Đang có mẫu hình Inside Bar còn hiệu lực trong cửa sổ breakoutWindow (tối đa 5 nến).
  • Giá đóng cửa phá vỡ lên trên vùng Mother Bar có đệm: close > motherHigh + breakBuffer.
  • Nến phá vỡ là nến tăng (close > open, khi requireBreakoutCandle = true) và đạt tỷ lệ thân nến tối thiểu (nếu bật requireBreakoutBody).
  • Xu hướng EMA ủng hộ chiều tăng (longTrendOK): ema > ema[3] và close > ema (khi bật useEMAFilter và requirePriceEMA).
  • Thỏa mãn các bộ lọc tùy chọn nếu được bật: adx >= 18.0, volume >= avgVolume * 1.10, và h1Close > h1EMA.
  • Cổng kiểm soát giao dịch chung canTrade trả về true.

4.2. Điều kiện vào lệnh Short

Lệnh Short (enterShort) được kích hoạt khi thỏa mãn đối xứng với chiều Long:

  • Tham số tradeDirection là "Short" hoặc "Both" (allowShort = true).
  • Đang có mẫu hình Inside Bar còn hiệu lực trong cửa sổ breakoutWindow.
  • Giá đóng cửa phá vỡ xuống dưới vùng Mother Bar có đệm: close < motherLow - breakBuffer.
  • Nến phá vỡ là nến giảm (close < open, khi requireBreakoutCandle = true) và đạt tỷ lệ thân nến tối thiểu (nếu bật requireBreakoutBody).
  • Xu hướng EMA ủng hộ chiều giảm (shortTrendOK): ema < ema[3] và close < ema (khi bật useEMAFilter và requirePriceEMA).
  • Thỏa mãn các bộ lọc tùy chọn nếu được bật (adxOK, volumeOK, shortH1OK) và cổng canTrade = true.

4.3. Điều kiện kiểm soát giao dịch chung

Cổng canTrade bắt buộc mọi lệnh vào mới phải đáp ứng:

  • Nến đã đóng và khung Intraday: barstate.isconfirmed và timeframe.isintraday.
  • Trạng thái Flat: strategy.position_size == 0 và strategy.opentrades == 0 (không nhồi lệnh, pyramiding=0), đồng thời freshEntryBar đảm bảo không vào 2 lệnh trên cùng một nến.
  • Giới hạn lệnh trong ngày: tradesToday < maxTradesPerDay (mặc định tối đa 2 lệnh/ngày).
  • Thời gian nghỉ (Cooldown): bar_index - lastExitBar > cooldownBars (mặc định phải qua ít nhất 3 nến kể từ nến đóng lệnh gần nhất).
  • Khung giờ giao dịch (Asia/Ho_Chi_Minh): sessionOK yêu cầu nến mở từ 09:15 trở đi và đóng không quá 14:15, đồng thời beforeClose yêu cầu closeMin < 14:45.

5. Quản trị Stop Loss, Take Profit và Thoát lệnh

5.1. Cơ chế Stop Loss và quy đổi Tick

Bot không sử dụng SL thả nổi theo đỉnh/đáy nến mà áp dụng mức Stop Loss cố định theo điểm (stopLossPoints = 5.0 điểm mặc định). Giá trị điểm được quy đổi sang số tick chuẩn của hợp đồng phái sinh:

  • slTicks = math.max(1, int(math.round(stopLossPoints / syminfo.mintick)))
  • effectiveSL = slTicks * syminfo.mintick
  • Với lệnh Long, đường SL nằm tại strategy.position_avg_price - effectiveSL. Với lệnh Short, đường SL nằm tại strategy.position_avg_price + effectiveSL.

5.2. Cơ chế Take Profit, Time Exit và Session End

  • Take Profit cố định: Tính tương tự SL qua takeProfitPoints = 15.0 điểm (tpTicks), tương ứng tỷ lệ Risk:Reward = 1:3. Code không sử dụng cơ chế dời hòa vốn (Break Even) hay Trailing Stop.
  • Time Exit (Tùy chọn): Mặc định tắt (useTimeExit = false). Khi bật, nếu số nến nắm giữ barsHeld >= maximumHoldingBars (20 nến) trên nến đã đóng (và chưa tới nến đóng phiên), bot gọi strategy.close_all để thoát lệnh.
  • Session End (Đóng lệnh cuối phiên): Tại nến có openMin < 14:45 và closeMin >= 14:45 (forceCloseBar), nếu vẫn còn vị thế mở, bot lập tức gọi strategy.close_all với ghi chú "Session End" để không giữ vị thế qua đêm.

5.3. Bảng tổng hợp cơ chế bảo vệ vị thế

Cơ chếTrạng thái mặc địnhCông thức / Điều kiện kích hoạtHành động
Stop Loss (SL)Luôn bậtCố định 5.0 điểm (slTicks) từ giá khớp trung bìnhĐóng vị thế qua strategy.exit
Take Profit (TP)Luôn bậtCố định 15.0 điểm (tpTicks) từ giá khớp trung bìnhChốt lời qua strategy.exit
Time ExitTắt (false)barsHeld >= 20 nến trên nến đóngGọi strategy.close_all ("Time Exit")
Session EndLuôn bậtNến giao cắt mốc 14:45 (forceCloseBar)Gọi strategy.close_all ("Session End")
Break Even / TrailingKhông cóKhông tích hợp trong mã nguồn CNPS81—

6. Hướng dẫn cài đặt và đọc bảng Diagnostics trên TradingView

Các bước cài đặt

  1. Mở biểu đồ hợp đồng tương lai VN30F1M trên TradingView và chọn khung thời gian Intraday (ví dụ 5m hoặc 15m).
  2. Nhấp vào tab Pine Editor ở thanh công cụ phía dưới màn hình.
  3. Xóa toàn bộ code mặc định, sao chép nguyên vẹn mã nguồn CNPS81 INSIDE BAR BREAKOUT ở Mục 1 và dán vào Pine Editor.
  4. Nhấn Save để lưu chiến lược, sau đó nhấn Add to chart để đưa bot lên biểu đồ.
  5. Mở phần Settings (Cài đặt) của chiến lược: nếu muốn đánh cả 2 chiều, chuyển Trade Direction từ "Long" sang "Both"; bật Show Diagnostics nếu muốn theo dõi bảng thống kê trực tiếp trên chart.

Cách đọc bảng chẩn đoán (Diagnostics Table)

Khi bật Show Diagnostics = true, bảng table.new ở góc trên bên phải hiển thị 18 dòng thông số trạng thái theo thời gian thực tại nến cuối cùng:

  • Dòng CNPS81: Hiển thị khung thời gian hiện tại (timeframe.period).
  • Inside Bars / Expired Patterns: Tổng số mẫu hình Inside Bar đã ghi nhận và số mẫu hình hết hạn sau breakoutWindow.
  • Bull Breakouts / Bear Breakouts: Tổng số lần giá đóng cửa vượt Mother High + buffer hoặc thủng Mother Low - buffer.
  • Long Bases / Short Bases: Số lần Breakout đạt điều kiện nến Breakout (requireBreakoutCandle và requireBreakoutBody).
  • Filtered Long / Filtered Short: Số tín hiệu vượt qua toàn bộ bộ lọc EMA, ADX, Volume và H1 Bias.
  • Long Entries / Short Entries: Số lệnh thực tế đã được gửi qua cổng canTrade.
  • Pattern Active / Mother High / Mother Low: Cho biết hiện có mẫu hình nào đang chờ phá vỡ (YES/NO) cùng 2 mốc giá Mother Bar đang theo dõi.
  • EMA Up / EMA Down: Trạng thái độ dốc đường EMA 50 (YES/NO).
  • Trades Today / Position: Số lệnh đã giao dịch trong ngày trên tổng hạn mức (x/2) và trạng thái vị thế hiện tại (LONG, SHORT hoặc FLAT).

7. Cách thiết lập cảnh báo tín hiệu giao dịch (Alert)

Để nhận thông báo tự động về điện thoại, Telegram hoặc Webhook khi Bot CNPS81 phát sinh lệnh:

  1. Nhấn vào biểu tượng Alert (Đồng hồ báo thức) trên thanh công cụ TradingView.
  2. Tại mục Condition, chọn chiến lược CNPS81 INSIDE BAR BREAKOUT.
  3. Tại ô Message, xóa nội dung mặc định và nhập chính xác biến hệ thống: {{strategy.order.alert_message}}.
  4. Đặt tên Alert và nhấn Create để kích hoạt. Nếu không muốn nhận thông báo khi chạm SL/TP, bạn có thể tích chọn Disable SL/TP Alerts trong phần cài đặt của bot.

Bảng thông điệp Alert của CNPS81

Sự kiệnNguồn phát trong CodeNội dung thông điệp (alert_message / alert_profit / alert_loss)
Vào lệnh Longstrategy.entry("Long", ...)🟢 VÀO VỊ THẾ LONG (CNPS81) kèm Giá vào, Cắt lỗ (SL), Chốt lời (TP)
Vào lệnh Shortstrategy.entry("Short", ...)🔴 VÀO VỊ THẾ SHORT (CNPS81) kèm Giá vào, Cắt lỗ (SL), Chốt lời (TP)
Chốt lời Longstrategy.exit("Long Exit", ...)💰 CHỐT LỜI LONG (CNPS81 - TP HIT) kèm Giá chốt lời
Cắt lỗ Longstrategy.exit("Long Exit", ...)🛑 CẮT LỖ LONG (CNPS81 - SL HIT) kèm Giá cắt lỗ
Chốt lời Shortstrategy.exit("Short Exit", ...)💰 CHỐT LỜI SHORT (CNPS81 - TP HIT) kèm Giá chốt lời
Cắt lỗ Shortstrategy.exit("Short Exit", ...)🛑 CẮT LỖ SHORT (CNPS81 - SL HIT) kèm Giá cắt lỗ
Đóng hết thời gianstrategy.close_all (Time Exit)⏱️ ĐÓNG VỊ THẾ HẾT THỜI GIAN (CNPS81 - Time Exit) kèm Giá đóng
Đóng hết phiênstrategy.close_all (Session End)⏰ ĐÓNG VỊ THẾ HẾT PHIÊN (CNPS81 - Session End) kèm Giá đóng

Kết luận

Bot CNPS81 – Inside Bar Breakout là một hệ thống giao dịch gọn gàng, kỷ luật và minh bạch cho thị trường phái sinh VN30F1M. Chiến lược phát huy hiệu quả tốt nhất trong các giai đoạn thị trường có xu hướng rõ ràng (khi đường EMA 50 tạo độ dốc ổn định) xen kẽ các nhịp tích lũy ngắn để tạo điểm bứt phá với tỷ lệ lợi nhuận/rủi ro 3:1 và giới hạn giao dịch chặt chẽ trong phiên.

Bạn có thể tham khảo thêm các chiến lược khác trong hệ sinh thái như Bot CNPS50 - Trend Analysis V2 và Bot CNPS49 - Daily Open để đa dạng hóa góc nhìn và lựa chọn phương pháp phù hợp với phong cách giao dịch của mình.

Thông tin chỉ mang tính tham khảo, không phải khuyến nghị đầu tư. Kết quả kiểm thử quá khứ không đảm bảo lợi nhuận trong tương lai.

Thông tin trong bài chỉ mang tính tham khảo, không phải khuyến nghị mua bán. Giao dịch phái sinh có rủi ro cao do sử dụng đòn bẩy; nhà đầu tư tự chịu trách nhiệm với quyết định của mình.

Đinh Mạnh Đạt

Nhà nghiên cứu định lượng, chuyên sâu về dữ liệu Open Interest và quản trị vị thế.

Bản tin phái sinh mỗi phiên
Nhận bản tin mỗi phiên + Dự báo Nhịp đập phái sinh

Giao dịch & cuộc sống

Xem tất cả →
Cộng đồng