Render Story Verbs
Cú pháp vẽ đồ thị: line, mark, level
Cú pháp Story-style Vẽ Đồ Thị
Trong khối render:, Quanta v2 giới thiệu cú pháp giống câu văn để vẽ mọi thứ.
Khẩu quyết cấu trúc: *Name it "as" · place it "at" · paint it "in" · style it "with" · shap"ed"*
render: panel main: line fast_ma as "Fast v2" in cyan dashed with width 2 mark long_setup as "Long" at below_bar in lime shaped triangle_up level 70 as "Overbought" in red dotted
Các Lệnh Cơ Bản
1. `line`: Vẽ đường (từ một Series).
- *Modifier*:
in <color>,dashed | dotted | solid,with width <1-4>.
2. `mark` (alias của marker): Vẽ biểu tượng đánh dấu khi điều kiện boolean là True.
- *Shape*:
circle, square, arrow_up, arrow_down, triangle_up, triangle_down, cross, diamond. - *Location*:
above_bar, below_bar, at_price.
3. `level`: Vẽ đường ngang (Scalar) rẻ tiền cho các ngưỡng tham chiếu (VD RSI 70/30).
Bạn cũng có thể dùng hàm truyền thống như: line(fast_ma, color: cyan, dash: true). Tuy nhiên, cú pháp Story dễ đọc hơn nhiều.
Wiki liên quan