Spread calculation

Posted By: pcz

Spread calculation - 04/04/17 14:42

It's great that now we can store bid-ask spread in fVal variable of T6 structs. It makes everything much easier. But if my observation is correct the spread is applied in whole on entry for short trades and on exit for long trades. This however makes it impossible to accurately backtest with variable spread because the exit spread is not known at the time of trade entry. Would it be possible to change the behavior in such way that the spread is applied for example only on trade exit in both cases? Or is there some workaround beside summing all entry / exit spreads separately?
Posted By: jcl

Re: Spread calculation - 04/05/17 17:05

Hmm, I do not see how. Short trades are opened at the bid price, not at the ask price, so how could the spread be applied at exit?
Posted By: pcz

Re: Spread calculation - 04/06/17 13:44

My mistake, the original question makes no sense as we're testing with ask prices and not mean prices.
© 2024 lite-C Forums