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 (AndrewAMD, Nymphodora, Quad), 919 guests, and 6 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
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