Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by jcl. 04/20/24 08:52
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 712 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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