Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
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
5 registered members (AndrewAMD, SBGuy, Petra, flink, 1 invisible), 699 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Changing StartMarket produces wrong data in dayHigh for Tokyo #482186
01/07/21 23:23
01/07/21 23:23
Joined: Jan 2021
Posts: 4
F
Figurehunter Offline OP
Guest
Figurehunter  Offline OP
Guest
F

Joined: Jan 2021
Posts: 4
I want the OHLC for the three main sessions: New York, London and Tokyo

Using dayOpen/Close/High/Low works for all three if I keep with the default StartMarket times of 0930 and EndMarket of 1600

If I change to FOREX hours with a StartMarket of 0800 it still works for New York and London but it FAILS for Tokyo

The failure is only within the first hour which occurs on the previous day in UTC time. Instead of starting fresh with the new sessions Highs and Lows it starts with the previous sessions Highs and Lows.

I plotted the results. Highs and Lows for each session. New York in Red, London in Lightblue and Tokyo in Yellow.

[Linked Image]

Now that I plotted it and finished this post I realized that the Highs and Lows auto-corrects itself and all future data is correct so this might be a plotting issue instead.

Code
	vars Price = series(price());


	StartMarket = 0800;
//	EndMarket = 1600; no change default



	var DEOpen = dayOpen(ET,0);
	var DEHigh = dayHigh(ET,0);
	var DELow = dayLow(ET,0);
	var DEClose = dayClose(ET,0);
	
	var DLOpen = dayOpen(WET,0);
	var DLHigh = dayHigh(WET,0);
	var DLLow = dayLow(WET,0);
	var DLClose = dayClose(WET,0);
	
	var DJOpen = dayOpen(UTC+9,0);
	var DJHigh = dayHigh(UTC+9,0);
	var DJLow = dayLow(UTC+9,0);
	var DJClose = dayClose(UTC+9,0);
	
	if(market(EST,0))
	{
	plot("USAHigh",DEHigh, LINE,RED);
	plot("USALow",DELow, LINE,RED);
	}

	if(market(WET,0))
	{
	plot("LondonHigh",DLHigh, LINE,LIGHTBLUE);
	plot("LondonLow",DLLow, LINE,LIGHTBLUE);
	}
	
	if(market(JST,0))
	{
	plot("TokyoHigh",DJHigh, LINE,ORANGE);
	plot("TokyoLow",DJLow, LINE,ORANGE);
	}


Re: Changing StartMarket produces wrong data in dayHigh for Tokyo [Re: Figurehunter] #482192
01/09/21 14:52
01/09/21 14:52
Joined: Jan 2021
Posts: 4
F
Figurehunter Offline OP
Guest
Figurehunter  Offline OP
Guest
F

Joined: Jan 2021
Posts: 4
I have confirmed that this was a plotting issue but would still like to fix it. Either bug or user error but since I am very new to Zorro it is more likely user error.


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