Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,038 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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