Quanta Docs
·Tài liệu Quanta hoàn chỉnh cho Quant Studio
Khái niệmactstmt/orders
Order primitives — buy/sell/order
Paper/live: `buy`/`long`/`sell`/`short` (qty|weight|limit|tag|note|all), story `enter`/`close` (+ alias buy|sell).
quanta
act: when crossover(fast, slow) and not position.is_long: enter long with wnav 5pct tag "Trend entry" when crossunder(fast, slow) and position.is_long: close long tag "Exit" when breakout and not position.is_hold: qty = position_size(1pct, atr(market.high, market.low, market.close, 14) * 2) enter long with size qty tag "risk sized"
- Story (v2, khuyến nghị):
enter long|short with wnav …(% NAV),enter long|short with size …(KL/HĐ cố định),close long|short|all,flatten all. - Alias story:
enter buy≡enter long·enter sell≡enter short·close buy≡close long·close sell≡close short. with wnav→ runtimeweight:·with size→ runtimeqty:(nếusizemang đơn vịpct/bps→weight:).- Legacy
with size = …vẫn compile (cảnh báo) — cấm codegen mới. - Legacy / alias callable
buy(...)/long(...)/sell(...)/short(...)/order(...)— engine chấp nhận; codegen mới không dùng trừ khi user yêu cầu truyền thống. long(...)≡buy(...)·short(...)≡sell(...).- Chỉ trong block
act:/signals:. Allocator:quanta score …(xemstmt/signal) — trong hoặc ngoàiwhen.
Tham số order (runtime)
| Tham số | Alias / nguồn | Mặc định | Mô tả |
|---|---|---|---|
weight | story wnav; tên pct/nav/nav_pct | — | Tỷ trọng % NAV (0.05 hoặc 5pct) |
qty | story size (số cố định); quantity/contracts/shares | — | Số HĐ/cp cố định |
all | story close/flatten | false | Đóng hết vị thế ticker (sell(all: true) / buy(all: true) khi cover short) |
limit | — | — | Giá limit (collect; autotrade hiện vẫn market-basis) |
tag | story tag "…" | "" | Nhãn audit / idempotency |
note | story note "…" | — | Ghi chú metadata trên lệnh |
| ticker positional | buy("FPT", …) arg0 string ≤16 | ticker strategy | Ghi đè mã lệnh |
- Nhóm synonym: long =
buy()=enter long=enter buy=close short=close sell. - Nhóm synonym: short =
sell()=enter short=enter sell=close long=close buy.
#output#orders
Trợ lý Quanta"Học nhanh hơn, hiệu quả hơn cùng AI"
Xin chào! Tôi là trợ lý học ngôn ngữ Quanta. Hỏi tôi về cú pháp, hàm, hoặc cách viết một chiến lược cụ thể (ví dụ: "Làm sao để xác định đỉnh đáy để vẽ trendline?").