Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Time functions with manually set Bar #485992
05/25/22 13:48
05/25/22 13:48
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
In this snippet in EXITRUN/ evaluate():

for (Bar=X; Bar<Y; Bar++) {
watch("! tod=", tod(0), priceC(0) );
}
the returned close price IS changing in line with changing Bar, but not tod.

This looks inconsistent.


Last edited by Zheka; 05/25/22 13:49.
Re: Time functions with manually set Bar [Re: Zheka] #485993
05/25/22 14:03
05/25/22 14:03
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
for (Bar=X; Bar<Y; Bar++) {
int bOff = NumBars-1 - Bar;

watch("! ltod=", ltod(ET, bOff) );
}

doesn't work either.

Re: Time functions with manually set Bar [Re: Zheka] #485994
05/25/22 19:45
05/25/22 19:45
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
https://zorro-project.com/manual/en/numbars.htm

Bar is the current bar index. Overwriting the current bar index is probably no good idea.

All price and time functions have offset parameters.

Re: Time functions with manually set Bar [Re: Zheka] #485999
05/25/22 22:06
05/25/22 22:06
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
I am not 'overwriting' the current bar index. I am going through Bars manually once again in EXITRUN (i recall manual mentions such possibility of manually changing the Bar index; and it works).

All price and time functions have offset parameters. - Right. And - as expected - priceClose(0) does return the close price of the set Bar, but neither tod(0) nor tod(NumBars-1-Bar) do.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1