Execution Realism
Execution realism properties — slippage, commission, margin, pyramiding, and backtest_fill_limits_assumption in strategy declarations.
Execution Realism Properties Belong in the Teaching Surface#
The current example suite now has dedicated strategies for slippage, commission, margin, pyramiding, and limit-fill assumptions. That means these properties are no longer just internal runtime knobs. They are part of the authoring contract users should actually learn.
| Property | Why you would set it | Example file |
|---|---|---|
slippage | Model less optimistic fills in backtest and replay. | pynescript_slippage_strategy.py |
commission_type, commission_value | Express cash-per-order or similar fee assumptions directly in the declaration. | pynescript_commission_strategy.py |
default_qty_type, default_qty_value, margin_long, margin_short | Control percent sizing and margin assumptions without hiding them in comments. | pynescript_margin_strategy.py |
pyramiding | Allow staged add-on entries in the same direction. | pynescript_pyramiding_strategy.py |
backtest_fill_limits_assumption | Teach stricter backtest handling for limit orders. | pynescript_limit_fill_assumption_strategy.py |
strategy(
"Limit Fill Assumption Strategy",
overlay=True,
backtest_fill_limits_assumption=1,
slippage=2,
commission_type="cash_per_order",
commission_value=5,
pyramiding=1,
process_orders_on_close=True,
)