Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (VoroneTZ), 1,234 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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