Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (rki), 405 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
Page 1 of 4 1 2 3 4
1.79 - Spread and marketVal() in test mode #471438
03/04/18 12:05
03/04/18 12:05
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Am I doing something wrong or is the spread in test mode with marketVal() not propperly supported?

Code:
function tick() {
	if(is(TESTMODE))
		Spread = marketVal();
	printf("n%04d-%02d-%02d %02d:%02d:%02.3f, %s: %.5f, Spread: %.5f", year(),month(),day(),hour(),minute(),second(),Asset, priceClose(), Spread);
	}
}

function run() {
  LookBack = 0;
  History = ".t1";
  StartDate = 20180302;
  set(TICKS+LOGFILE);
}


produces following log:
Code:
V 1.797 on Sun 18-03-04 12:56:33
Test: ShowSpread EUR/USD (TICKS) 2018
2018-03-02 01:00:0.033, EUR/USD: 1.22735, Spread: 0.00000
2018-03-02 01:00:0.233, EUR/USD: 1.22734, Spread: 0.00000
2018-03-02 01:00:0.420, EUR/USD: 1.22734, Spread: 0.00000
2018-03-02 01:00:0.996, EUR/USD: 1.22733, Spread: 0.00000
2018-03-02 01:00:1.002, EUR/USD: 1.22731, Spread: 0.00000
2018-03-02 01:00:1.027, EUR/USD: 1.22729, Spread: 0.00000
2018-03-02 01:00:1.043, EUR/USD: 1.22728, Spread: 0.00000
2018-03-02 01:00:1.109, EUR/USD: 1.22729, Spread: 0.00000
2018-03-02 01:00:1.216, EUR/USD: 1.22728, Spread: 0.00000
2018-03-02 01:00:1.308, EUR/USD: 1.22728, Spread: 0.00000


while the corresponding .t1 (in ZHistoryEditor, downloaded from FXCM with assetHistory(Asset,0)):
Code:
2018.03.02 01:00:01.308	1,22728
2018.03.02 01:00:01.308	-1,22727
2018.03.02 01:00:01.215	1,22728
2018.03.02 01:00:01.108	1,22729
2018.03.02 01:00:01.043	1,22728
2018.03.02 01:00:01.026	1,22729
2018.03.02 01:00:01.002	1,22731
2018.03.02 01:00:00.996	1,22733
2018.03.02 01:00:00.996	-1,22732
2018.03.02 01:00:00.419	1,22734
2018.03.02 01:00:00.419	-1,22732
2018.03.02 01:00:00.233	1,22734
2018.03.02 01:00:00.233	-1,22733
2018.03.02 01:00:00.033	1,22735
2018.03.02 01:00:00.033	-1,22733


Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471464
03/05/18 14:37
03/05/18 14:37
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The spread of that bar was just 0. This can happen in historical data.

Spread is only stored for bars, not for ticks. So it won't change tick by tick. This is on our list for the next update - spreads will then be stored by tick.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
Spread is only stored for bars, not for ticks.
This is exactly what one expects if he read in the manual:
Quote:
If .t1 data contains both ask and bid quotes, marketVal returns the recent ask-bid spread

I would laugh about if I didn't waste much time searching for errors in my code.

Re: 1.79 - Spread and marketVal() in test mode [Re: jcl] #471470
03/05/18 17:03
03/05/18 17:03
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted By: jcl
This is on our list for the next update - spreads will then be stored by tick.
Will plugins be needing to support a new tick struct? Or will Zorro simply interpret the T1 data differently?

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
The .t1 files contains positive (ask) and negative values (bid). The ask can be accessed with priceClose(). If there was a chance to access the bid one could calculate the spread himself I think.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471488
03/06/18 08:43
03/06/18 08:43
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Plugins need not be changed, it is an internal Zorro function. The .t1 file is not directly stored, so you have no direct access to the bid. You could load it in parallel in a dataset and evaluate it, but better wait for the Zorro implementation. It won't take long.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Will there be a notice in What's new if it is realized?

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #471634
03/12/18 09:16
03/12/18 09:16
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, it will.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Great!

BTW: I tried to work around using a BarPeriod of 1./60 and learned that it is useless setting it lower than one hour concerning to the spread. But Zorro reacted generally very angry to this attempt, it mixes up times (time of the end of the trade is before its start and not even of the bar period) and also the 10,000-times-higher-due-to-the-Forex-multiplicator problem appeared again (1.79.8):
Quote:
[95: Mon 18-02-26 01:34:04] 0000 -1200 0/2 (1.39684)....
[EURUSD_B1::S9601] Short 1@1.22998 at 01:36:00
[EURUSD_B2::L9602] Long 1@1.23001 at 01:36:00
[EURUSD_B2::L9602] Sell 1@1.22999: -600 at 01:35:01
[EURUSD_B1::S9601] Cover 1@1.22989: -600 at 01:35:01

[96: Mon 18-02-26 01:35:03] -1200 -1354 1/3 ....

Maybe those BarPeriods are not for broker arbitrage scripts?

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

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Possibly, but I suppose that the problem is caused by many empty bars with no quotes inside. Can you contact Support with that script? They'll look into it.

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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

Chief Engineer
jcl  Offline

Chief Engineer

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

Chief Engineer
jcl  Offline

Chief Engineer

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

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472103
04/08/18 12:45
04/08/18 12:45
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I am curious if the Realistic ticks mode indeed has a slippage of 5sec.
5 sec seem too many, 1 sec is probably closer to reality...

Re: 1.79 - Spread and marketVal() in test mode [Re: Zheka] #472107
04/08/18 16:43
04/08/18 16:43
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Good point. I don't think there is any slippage involved. If I read the log right it seems the trades are opened the or next second the threshold's break was found:

Quote:
2018-04-02 11:58:33.4425
AssetA: EURUSD_AT, PriceA: 1.23424, SpreadA: 0.00000, CommissionA: 0.00007
AssetB: EURUSD_FXCM, PriceB: 1.23382, SpreadB: 0.00001, CommissionB: 0.00007
Difference: 0.00042, Threshold: 0.00038
[EURUSD_AT::S1901] Short 1@1.23414 at 11:58:33
[EURUSD_FXCM::L1902] Long 1@1.23401 at 11:58:33
[...]
2018-04-02 13:24:36.8495
AssetA: EURUSD_AT, PriceA: 1.23296, SpreadA: 0.00000, CommissionA: 0.00007
AssetB: EURUSD_FXCM, PriceB: 1.23332, SpreadB: 0.00000, CommissionB: 0.00007
Difference: -0.00036, Threshold: 0.00035
[EURUSD_AT::L0501] Long 1@1.23303 at 13:24:37
[EURUSD_FXCM::S0502] Short 1@1.23313 at 13:24:37
[...]
2018-04-02 13:47:54.9835
AssetA: EURUSD_AT, PriceA: 1.23185, SpreadA: 0.00000, CommissionA: 0.00007
AssetB: EURUSD_FXCM, PriceB: 1.23232, SpreadB: 0.00003, CommissionB: 0.00007
Difference: -0.00047, Threshold: 0.00043
[EURUSD_AT::L2801] Long 1@1.23177 at 13:47:55
[EURUSD_FXCM::S2802] Short 1@1.23220 at 13:47:55
[...]

Slippage and Fill have default values, so there should be 5 sec slippage as you mentioned, maybe there is another treatment when trading on .t1?

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472131
04/10/18 07:33
04/10/18 07:33
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71
Hi Sphine, It seems that Case 3 is the most realistic. However, it has only 4 trades per week. I am wondering if indices e.g. Ger30, SPX500.. would be a better assets for the broker arbitrage strategies.

Re: 1.79 - Spread and marketVal() in test mode [Re: firecrest] #472137
04/10/18 16:33
04/10/18 16:33
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Hmm ... case 3 is not a simulation but recorded while trading on a demo account (therefore I wrote TRADE) and it reveals my actual problem: to find a simulation that matches trading circumstances. Those arbitrage effects often appear and disappear within one minute and therefore spread and timing at entry/exit are decisive.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472141
04/10/18 22:16
04/10/18 22:16
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
If you look in the recorded ticks timestamps - then what's the actual time difference between signal generated and execution?

Re: 1.79 - Spread and marketVal() in test mode [Re: Zheka] #472144
04/11/18 11:38
04/11/18 11:38
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
I wonder what the reason is for spread difference between Trade and Test of ActiveTrades?

When it comes to TEST: Does marketVal() return correct values? Are they in line with your own calculation?

The same questions for TRADE: does spread that is returned by the broker is in line with your calculation based on ticks?

Last edited by kujo; 04/11/18 11:45.
Re: 1.79 - Spread and marketVal() in test mode [Re: kujo] #472145
04/11/18 16:03
04/11/18 16:03
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
The time differences are marginal, these are the corresponding ticks from AT:

2018.04.02 11:58:33.441 1,23424
2018.04.02 13:24:36.848 1,23296
2018.04.02 13:47:54.982 1,23185

I don't know if marketVal() return the right values, if I regard the ticks from above again and verify them against the last bid price, I calculate the following:

2018.04.02 11:58:33.441 1,23424
2018.04.02 11:58:33.441 -1,23419
(2018.04.02 11:58:32.988 1,23425)
(2018.04.02 11:58:32.988 -1,23419)
=> calculated spread: 0.00005, spread by marketVal(): 0.00000

2018.04.02 13:24:36.848 1,23296
2018.04.02 13:24:36.848 -1,23291
(2018.04.02 13:24:35.364 -1,23291)
=> calculated spread: 0.00005, spread by marketVal(): 0.00000

2018.04.02 13:47:54.982 1,23185
2018.04.02 13:47:54.982 -1,2318
(2018.04.02 13:47:54.482 1,23186)
(2018.04.02 13:47:54.482 -1,23181)
=> calculated spread: 0.00005 (0.00004), spread by marketVal(): 0.00000

Ticks in parentheses are the ticks before because jcl meant the bid price before could be significant, but in no case I come to the values marketVal() returns. There can be 2 reasons: I calculate wrong or marketVal() calculates wrong.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472150
04/12/18 13:22
04/12/18 13:22
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Hmm, it should be easy as 1,2,3. It looks like a bug. Have you written to support about marketVal()? How they explain zeros? Do you use the latest beta version?

Last edited by kujo; 04/12/18 13:23.
Re: 1.79 - Spread and marketVal() in test mode [Re: kujo] #472160
04/12/18 15:50
04/12/18 15:50
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Most of the info transfer between support and me concerning the marketVal() problem is documented here in the thread (it even started with a description of), therefore it's headlined with '1.79 Spread and marketVal() in test mode". 1.79 is just a bit outdated but it concerns to the actual beta. The latest results above (and the test of last week where the pics are from) are from 1.80.8/1.81.0.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472201
04/16/18 02:14
04/16/18 02:14
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Sphin, if I have problems with Zorro, I write to Support. Usually, they confirm that it's a bug or provide explanation if it was designed so. In case of marketVal() I see a problem. So the next step is to contact Support. They either confirm a bug or explain this behaviour. If you have already contacted the Support, then what was their response?

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
If I have problems with Zorro, esp. with a new feature and with a beta version (both is true in this case) I report it here in the beta area of the forum. I'm quite sure it will be read and if support needs more info (code, prices) they will apply for it as it has been already happened during this thread and/or the other one of mine.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472219
04/16/18 21:29
04/16/18 21:29
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
I see and it's up to you. Personally, I find it more effective to write directly to Support with such kind of issues. Anyways, keep us posted and good luck!

Re: 1.79 - Spread and marketVal() in test mode [Re: kujo] #472222
04/17/18 06:28
04/17/18 06:28
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Writing to Support is a bit faster, as I do not read the forum any day. But yes, I herewith apply for the code and data. We'd like to check why the marketval is zero.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
I sent it to support. This might bring an explanation for different FXCM prices but concerning the main problem, the difference of both test scenarios to trading on demo accounts, I can't point to more that there is obviously a difference, so that testing the strategy has only little to do with trading it. But I fear I cannot provide any idea why it is as it is.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472234
04/17/18 19:26
04/17/18 19:26
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Such latency- and liquidity-sensitive strategies cannot be properly evaluated in the usual way, without "level 2" data, nor on a demo account.

You have to trade it live with small(but somewhat realistic) amounts to gauge actual fills, compare/calibrate it to you demo-account fills and/or testing results and then decide...

Re: 1.79 - Spread and marketVal() in test mode [Re: Zheka] #472235
04/17/18 20:21
04/17/18 20:21
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
This is what I meant with 'systemic ones', I also fear that it might be difficult to impossible to get a realistic simulation.
BTW: I have noticed that Zorro nearly always crashes when the stop button is clicked while trading broker arbitrages. Maybe someone can look at this sometime.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
Support wrote to me that the sequence of storing bid and ask in the code for recording ticks was wrong. So I will try it with changed settings again and be back with new results.

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

Joined: Dec 2013
Posts: 568
Fuerth, DE
The new way recording ticks improved the test results so they seem to be more realistic but the differences between test and live runs are still there and although there are meanwhile similar (but not identical) test results using recorded and downloaded FXCM prices their differences to 'reality' are significant, they are even more significant if using real accounts instead of demos. Probably because real accounts behave more nervous esp. in shorter time frames. So I finish my efforts to simulate broker arbitrage, it is too much time consuming with only little use and turn my attention towards live trading.

Re: 1.79 - Spread and marketVal() in test mode [Re: Sphin] #472497
04/30/18 23:30
04/30/18 23:30
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline
Member
kujo  Offline
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Could you please share ticks recording script?

Re: 1.79 - Spread and marketVal() in test mode [Re: kujo] #472501
05/01/18 09:29
05/01/18 09:29
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Code:
void tick()
{
	T1* Bid = dataAppendRow(1,2);
	Bid->time = wdate();
	Bid->fVal = -(priceClose()-Spread);
	T1* Ask = dataAppendRow(1,2);
	Ask->time = wdate();
	Ask->fVal = priceClose();
}


void click()
{
	dataSort(1);
	dataSave(1,strf("History\%s_2018.t1",strx(Asset,"/","")));
	quit("Done!");
}

void run()
{
	BarPeriod = 1;
	LookBack = 0;
	panelSet(-1,-1,"Save");
}


Page 1 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