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, TipmyPip, Edgar_Herrera), 804 guests, and 4 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
Functions: dayOpen/dayClose - BarPeriod #474370
10/10/18 07:08
10/10/18 07:08
Joined: Sep 2018
Posts: 29
K
kerplunk1899 Offline OP
Newbie
kerplunk1899  Offline OP
Newbie
K

Joined: Sep 2018
Posts: 29
Hi all,

first of all, thank you guys for your constant support.
The tool is amazing, I'm facing the trading world as a beginner, but the scripting factor makes it so much more exciting.

Here's my issue.
I'm trying to get the exact closing and opening prices of the day before.
I found on the manual these two function that firstly seem to fit perfectly.
I'm using them like this:
- dayOpen(UTC, 1)
- dayClose(UTC, 1)

I'm trying with EUR/USD.
What I found out is a different behaviour of the functions when different BarPeriod are set.

I usually work with a BarPeriod = 1, so I would like to get the priceClose of the bar at 23.59 of the day before.
When I set it like this tough, the prices returned by the functions don't look right at all.
If I try to set it equals to 1440, the prices look perfect and match to what is shown in the ZHistoryEdior.


Can you please explain me why?
Is there a way to solve the issue obtaining the Open and Close price of the day before even with a BarPeriod equals to 1?
Should I maybe make use of the TimeFrame variable?


Thanks so much!
Regards,
Luca

Re: Functions: dayOpen/dayClose - BarPeriod [Re: kerplunk1899] #474385
10/11/18 06:46
10/11/18 06:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
It`s normally the other way around: the higher the bar period, the lower the price resolution, including dayOpen/Close. You can check their code in indicators.c.


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