What Does the Type Option Control in Trade Trigger Options?
The Type option in MagicTradeBot’s Trade Trigger Options controls how orders are executed after a trading signal is confirmed.
It determines whether the bot prioritizes speed and certainty of execution or price precision, directly affecting:
- Execution speed
- Slippage
- Fill probability
🔹 Available Options
1️⃣ Type: 0 → Market Order
Type: 0
Behavior:
- Executes immediately at the best available price in the order book
- Ensures the trade is filled instantly, even in fast-moving markets
- May incur higher slippage if the market is volatile
Best For:
- Scalp trading
- High-frequency trading (HFT) strategies
- Fast-moving or highly volatile markets
Pros:
- Immediate execution
- Never misses a trade signal
- Simple and reliable
Cons:
- Slippage risk during rapid price changes
- Price may deviate from signal target
2️⃣ Type: 1 → Limit Order
Type: 1
Behavior:
- Executes only at the specified price or better
- If the market price does not reach the limit, the order may remain unfilled
- Offers precise entry points, reducing slippage
Best For:
- Calm or low-volatility markets
- Traders who require precise price execution
- Swing or day trading strategies where timing is less critical
Pros:
- Low slippage
- Controlled entry price
- Can be adjusted with price buffers for better fill probability
Cons:
- May remain unfilled if price never reaches the limit
- Missed trades can occur during fast-moving markets
🔹 Supporting Settings for Type
1. AskPriceBufferPer
AskPriceBufferPer: 0.1
- Adds a small buffer to the limit order price to improve fill chances
- Example: If Ask = 100.00 and Buffer = 0.1 → Limit Price = 100.10
- Set to 0 for exact price matching
2. TimeInForce
TimeInForce: 60
- Duration (in seconds) a limit order remains open
- Cancels unfilled orders automatically to avoid stale trades
Recommended values:
- Scalping: 10–30s
- Day trading: 30–120s
🔹 Key Takeaways
| Type | Execution Speed | Slippage | Fill Certainty | Best For |
|---|---|---|---|---|
| 0 → Market | Immediate | Higher | Very High | Scalp, HFT, fast-moving markets |
| 1 → Limit | Conditional | Lower | May Miss | Calm markets, precise entries |
Summary:
- Use Market Orders for speed and guaranteed execution.
- Use Limit Orders for price precision and reduced slippage.
- Combine with AskPriceBufferPer and TimeInForce for optimal fill control.