Gamestudio Links
Zorro Links
Newest Posts
FXCM: "Can't connect to price server"
by jcl. 06/19/19 15:47
Data Execution Prevention Strikes Again
by Dooley. 06/19/19 15:38
assert
by jcl. 06/19/19 14:59
Bring the old grin back!
by Michael_Schwarz. 06/19/19 07:56
Help with calculation
by Qw3rty. 06/18/19 08:01
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
13 registered members (AndrewAMD, Kaga, JeyKey II, Dooley, Grat, kvm, alibaba, Ayumi, MatPed, 1 invisible), 632 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Qw3rty, Dal, Carson, giantj, dh85
18236 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Return current bar in Unix time #477143
05/24/19 05:32
05/24/19 05:32
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
Hello,

I am struggling to get Zorro to return the current bar in Unix time.
Apparently that can be done via utm() but I have trouble finding the correct var Date to feed.

Can someone help me with that?

Re: Return current bar in Unix time [Re: gamadeus] #477146
05/24/19 11:04
05/24/19 11:04
Joined: Jul 2000
Posts: 26,897
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 26,897
Frankfurt
utm(wdate(0))

Re: Return current bar in Unix time [Re: jcl] #477199
05/30/19 11:15
05/30/19 11:15
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
Thanks Jcl!

One problem though I have with this is that when I run this in Trademode under FRISTRUN it will not give me the current bar and timestamp but the first Lookback bar.

Is there any way to just get the current timestamp in that format without any bar offset required?

And a related question: is there a flag similar to FIRSTRUN that is triggered on the first bar after the Lookback period?

Re: Return current bar in Unix time [Re: gamadeus] #477200
05/30/19 14:04
05/30/19 14:04
Joined: Jul 2017
Posts: 373
Z
Zheka Online
Senior Member
Zheka  Online
Senior Member
Z

Joined: Jul 2017
Posts: 373

if (!is(LOOKBACK))
{
}

Re: Return current bar in Unix time [Re: Zheka] #477201
05/30/19 14:23
05/30/19 14:23
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
yes thanks of course I am aware of that.
but I want to know if there is a flag similar to INITRUN for Lookback, because !is(LOOKBACK) is true for every run after the lookback period

Re: Return current bar in Unix time [Re: gamadeus] #477204
05/30/19 16:09
05/30/19 16:09
Joined: Feb 2017
Posts: 664
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 664
Chicago

Re: Return current bar in Unix time [Re: AndrewAMD] #477205
05/30/19 16:24
05/30/19 16:24
Joined: Nov 2018
Posts: 48
G
gamadeus Offline OP
Newbie
gamadeus  Offline OP
Newbie
G

Joined: Nov 2018
Posts: 48
thanks a lot Andrew, should have realized that myself!


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