Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Spread calculation #465136
04/04/17 14:42
04/04/17 14:42
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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?

Re: Spread calculation [Re: pcz] #465149
04/05/17 17:05
04/05/17 17:05
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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?

Re: Spread calculation [Re: jcl] #465154
04/06/17 13:44
04/06/17 13:44
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
My mistake, the original question makes no sense as we're testing with ask prices and not mean prices.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1