Posted By: Sphin
1.79 - Spread and marketVal() in test mode - 03/04/18 12:05
Am I doing something wrong or is the spread in test mode with marketVal() not propperly supported?
produces following log:
while the corresponding .t1 (in ZHistoryEditor, downloaded from FXCM with assetHistory(Asset,0)):
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