I have to calculate exactly how much a strategy is losing to trading costs so I have some questions/assumptions how Zorro calculates profit/fees. Please let me know if anything is wrong:

1. Zorro treats all prices as ask prices so normally I guess Zorro calculates the PnL of a trade comparing the fEntryPrice and fExitPrice and subtracting fSpread because both prices are ask prices. If I use only limit orders, I'm assuming fEntryPrice is set to the exact fill price returned by the broker plugin, and not the ask price of the candle. If I manually set the fExitPrice also to the exact fill price of the exit order, I should therefore set fSpread to 0, because the entry/exit are the exact values.

2. If I enter trades with enterTrade, does Zorro at any point recalculate values such as fResult based on entry/exit and fees or does Zorro treat these trades as permanently fixed and takes its results as granted?

3. How does Zorro set fSlippage in Live mode? I'm getting fills between bid/ask, but noticed in the report at the end that slippage was non-zero.


Last edited by MegaTanker; 06/09/22 19:09.