📈 Backtest Chiến lược — AFL Custom + Community Scripts cho TTCK Việt Nam
AmiBroker Formula Language là ngôn ngữ backtest chuyên nghiệp nhất từ 2000s. Vnstock port AFL parser sang Python — bạn viết AFL ngay trong app.
5 dòng AFL = 1 chiến lược backtest đầy đủ
// Ví dụ: MA Crossover + RSI filter
Buy = Cross(MA(Close, 10), MA(Close, 20)) AND (RSI(14) < 60);
Sell = Cross(MA(Close, 20), MA(Close, 10)) OR (RSI(14) > 75);
PositionSize = 10000; // Cap 10K USD per trade
StopLoss = 0.05; // 5% SL
TakeProfit = 0.15; // 15% TP
Click "Run" → 0.3 giây sau có equity curve + win rate + profit factor + max DD.
Backtest engine với T+2 settlement VN
- Capital ban đầu 100M VNĐ (custom được)
- T+2 settlement đúng quy định VN
- Slippage 0.1% mỗi lệnh (realistic)
- Commission TCBS/SSI 0.15%
- Tính toàn bộ stats: win rate, profit factor, Sharpe, Sortino, max DD, expectancy
- Equity curve + trade list visualize qua Chart.js
Community Scripts — như TradingView VN
Sau khi script work:
- ✅ Public/Private toggle (control privacy)
- ✅ Like ❤️ → top liked scripts
- ✅ Fork 🔱 → sao chép để chỉnh
- ✅ Run counter
- ✅ Tags: #breakout #meanrevert #momentum #shark #ichimoku
- ✅ Search & sort: top liked / mới nhất / hot
8+ chiến lược built-in
- MA Crossover Classic — đơn giản nhất, dạy beginner
- RSI Mean Reversion — mua dump RSI<30, bán pump RSI>70
- Bollinger Breakout — vượt upper band + volume confirm
- MACD + Volume — momentum confirmation
- Triple Screen Elder — multi-timeframe
- Turtle Trading — Donchian channel breakout
- Ichimoku Cloud — phân tích Nhật Bản
- Smart Money Follow — kết hợp shark flow Vnstock (UNIQUE)
🚀 Trải nghiệm tính năng này ngay
Miễn phí với 20 mã + 20+ chỉ báo · Premium chỉ 299K/tháng
Mở ứng dụng →