Execution Nodes
The final step. Turn your logic signals into actual market orders.
Buy Node (Long)
Opens a Long position when triggered.
Input:
- Trigger: A boolean signal (True/False). A trade executes on the exact candle where the signal flips from False to True.
Behavior:
- Executes a Market Buy order.
- Automatically attaches Stop Loss and Take Profit orders based on your Backtest Configuration.
- If a position is already open, it will typically ignore new signals (unless pyramiding is enabled).
Sell Node (Short)
Opens a Short position when triggered.
Input:
- Trigger: A boolean signal (True/False).
Behavior:
- Executes a Market Sell order.
- Attaches SL/TP orders similar to the Buy node.
Risk & Execution Engine
The backend engine uses VectorBT for high-performance backtesting and a custom strict risk engine for realistic simulation.
Position Sizing Models:
- Fixed Percent: Allocates a fixed % of account equity per trade (e.g., 10% of capital). Used when no Stop Loss is set.
- Risk-Based: Calculates position size based on risk amount (e.g., Risk 1% of equity). Requires a Stop Loss.
Size = (Equity * Risk%) / (Entry - SL)
Risk Management:
- Stop Loss (SL): Can be Fixed % or ATR-based (Volatility adjusted).
- Take Profit (TP): Fixed %, ATR-based, or Risk-Reward Ratio (e.g., 2.0R).
- Max Daily Loss: Optional circuit breaker that halts trading for the day if a loss limit is reached.
Simulation Details
The engine simulates Market Impact (slippage based on position size) and commission fees. For precise SL/TP execution, it checks intraday price paths (High/Low) to determine if a stop was hit before the target, ensuring realistic results even on larger timeframes.
Performance Metrics
After every backtest, the engine calculates key performance indicators:
| Metric | Description |
|---|---|
| Total Return | Net profit or loss as a percentage of initial capital. |
| Win Rate | Percentage of trades that ended in profit. |
| Max Drawdown | The largest peak-to-valley decline in account equity. |
| Sharpe Ratio | Risk-adjusted return (using 0% risk-free rate). |