Different Bar Periods within same script?

Posted By: Geek

Different Bar Periods within same script? - 11/20/13 21:26

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..
Posted By: dusktrader

Re: Different Bar Periods within same script? - 11/20/13 21:49

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).
Posted By: Geek

Re: Different Bar Periods within same script? - 11/20/13 21:59

Great stuff, thanks laugh
Posted By: jcl

Re: Different Bar Periods within same script? - 11/21/13 08:24

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.
© 2024 lite-C Forums