Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,203 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Different Bar Periods within same script? #432993
11/20/13 21:26
11/20/13 21:26
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Is it possible for Zorro to run 2 different Bar Periods within the same script?

For instance the script will be trading with Period = 240:

But I also want Zorro to check weekly Bar Period = 7200; conditions before entering a trade.

Thanks..

Re: Different Bar Periods within same script? [Re: Geek] #432997
11/20/13 21:49
11/20/13 21:49
Joined: Jul 2013
Posts: 522
D
dusktrader Offline
User
dusktrader  Offline
User
D

Joined: Jul 2013
Posts: 522
Yes it is possible, although I haven't done it myself yet. It explains more on the manual page here

I believe BarPeriod needs to be set to the smaller unit, and then TimeFrame to the larger unit. So in your example I think you would have BarPeriod=240 and then TimeFrame=30 (30x the BarPeriod).

Re: Different Bar Periods within same script? [Re: dusktrader] #432998
11/20/13 21:59
11/20/13 21:59
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Great stuff, thanks laugh

Re: Different Bar Periods within same script? [Re: Geek] #433008
11/21/13 08:24
11/21/13 08:24
Joined: Jul 2000
Posts: 27,987
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,987
Frankfurt
One remark - due to irregular holidays, a week has no fixed number of bars. Therefore you must synchronize the time frame with the start of the week. In the manual there's an example for synchronizing it to a day.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1