Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #471684
03/14/18 18:14
03/14/18 18:14
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Done - this happens also with the original 'Simple broker arbitrage example'.

Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #471700
03/15/18 18:17
03/15/18 18:17
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
The support's answer was that it will be fixed in next week's update.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471786
03/19/18 19:41
03/19/18 19:41
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
marketVal and marketVol can now also be called in a TMF or tick function.
Spread still changes according to BarPeriod, not per tick (1.80.4) or shouldn't this not being implemented yet?

Additionally there are mysterious time hoppings during tick function like:
Quote:
[...]
2018-02-07 01:53:49.046, EUR/USD: 1.23875, Spread: 0.00002
2018-02-07 01:53:49.090, EUR/USD: 1.23876, Spread: 0.00002
2018-02-07 01:53:53.323, EUR/USD: 1.23875, Spread: 0.00002
2018-02-07 01:53:53.360, EUR/USD: 1.23875, Spread: 0.00002
2018-02-07 01:53:53.603, EUR/USD: 1.23876, Spread: 0.00002
2018-02-07 01:53:56.414, EUR/USD: 1.23875, Spread: 0.00002
2018-02-07 01:54:59.783, EUR/USD: 1.23875, Spread: 0.00002
2018-02-07 01:54:59.791, EUR/USD: 1.23874, Spread: 0.00002

[12: Wed 18-02-07 01:54:00] (1.23874)
2018-02-07 01:54:0.321, EUR/USD: 1.23874, Spread: 0.00002
2018-02-07 01:54:0.335, EUR/USD: 1.23873, Spread: 0.00002
2018-02-07 01:54:5.518, EUR/USD: 1.23873, Spread: 0.00002
[...]

The script is the same as at the begin of this thread, added BarPeriod = 1.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471809
03/20/18 10:49
03/20/18 10:49
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
marketVal change per tick was implemented only recently.

Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #471893
03/24/18 10:19
03/24/18 10:19
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Waited till weekend and with 1.80.6 it's really confusing because Spread=marketVal() now contains a price and it seems to be priceClose(-1) that means peeking one tick into future:

Quote:
[1: Mon 18-03-05 00:01:00] (1.23173)
2018-03-05 00:01:0.039, EUR/USD: 1.23174, Spread: 1.23173
2018-03-05 00:01:2.644, EUR/USD: 1.23173, Spread: 1.23172
2018-03-05 00:01:2.655, EUR/USD: 1.23172, Spread: 1.23171
2018-03-05 00:01:2.688, EUR/USD: 1.23171, Spread: 1.23170
2018-03-05 00:01:2.718, EUR/USD: 1.23170, Spread: 1.23171
2018-03-05 00:01:4.305, EUR/USD: 1.23171, Spread: 1.23170
2018-03-05 00:01:6.248, EUR/USD: 1.23170, Spread: 1.23171
2018-03-05 00:01:6.771, EUR/USD: 1.23171, Spread: 1.23172

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471919
03/26/18 13:57
03/26/18 13:57
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
You're right. There are 2 bugs, one with the spread and one with the minute display. The minute bug is a Windows bug and can only be partially fixed, but the spread bug should be fixed in the latest version, 1.80.7

Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #471972
03/30/18 08:47
03/30/18 08:47
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I can confirm that now there is a variable spread that changes from tick to tick. But anyhow there seems to be a problem anywhere. If I trade the simple broker arbitrage script in EUR/USD on 2 demo accounts over one week with a threshold factor of 2.5 there are 16 trades, if I test it with Spread=marketVal() over the same week there are 514 trades. I will verify it again next week and explicitely record and store the ticks of the accounts used and if those differences reappeared I'll come back with them in the broker arbitrage thread.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472038
04/03/18 08:09
04/03/18 08:09
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I hope this does not mean that one or both brokers have higher spread live than in their history. Please let me know the outcome of the test.

Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #472057
04/03/18 16:48
04/03/18 16:48
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
This is one fact I try to explore but so far this can only be concerned to FXCM, their history I downloaded in the normal way with assetHistory(Asset,0) but this week I additionaly store their ticks with the function you gave me in the "Multiple broker connection" thread (recording live) to verify any differences that might result from history creation source/way. One other broker is ActiveTrades and their history I only store while recording live because I can download tick prices via MT4 only the last 12 hours or something. Since this week I included Oanda in the test and their tick history should be downloadable with assetHistory with some restrictions (listed in the manual, I didn't try myself so far) so I can compare them with live results. I will report when the tests have finished.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472097
04/07/18 11:54
04/07/18 11:54
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
So far my test results with the "simple broker arbitrage example" with a threshold factor of 2.5 extended by some plot functions and Zorro 1.80.8:

1. TEST with history FXCM from assetHistory / ActiveTrades from storing (recording) within the tick function on demo account:

Test BA_EURUSD (TICKS)

Bar period: 1 min (avg 1 min)
Test period: 2018-04-02..2018-04-06 (6955 bars)
Lookback period: 0 bars (0 minutes)
Simulation mode: Realistic ticks (slippage 5.0 sec)
Spread: marketVal()

Number of trades: 580 (43474/year, 837/week, 173/day)


SpreadA is from ActiveTrades, SpreadB from FXCM


2. TEST with history both FXCM and ActiveTrades from storing (recording) within the tick function on demo account:

Test BA_EURUSD (TICKS)

Bar period: 1 min (avg 1 min)
Test period: 2018-04-02..2018-04-06 (6955 bars)
Lookback period: 0 bars (0 minutes)
Simulation mode: Realistic ticks (slippage 5.0 sec)
Spread: marketVal()

Number of trades: 8 (600/year, 12/week, 3/day)




3. TRADE (Demo Accounts) with FXCM / ActiveTrades:

Bar period: 1 min (avg 1 min)
Trade period: 2018-04-02..2018-04-06
Spread: Live spread from broker

Number of trades: 2 (167/year, 4/week, 1/day)



For the only difference between 1 and 2 is the source of the FXCM prices it can be suspected that the spreads in their history loaded with assetHistory is another than stored within a tick function. But this does not explain all because although the spread from ActiveTrades is directly stored in the tick function it differs strongly between test and trade scenario.

I don't know if these differences can be avoided in general or if they are of systemic ones but IMO those back test results should be regarded very carefully, they can be much too optimistic (the test under point 1 has a PF of 2.34 (2.07) and a pairwise win rate of 82%). Would be nice if this could be realized.

Page 2 of 4 1 2 3 4

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1