Way to get series of different bar periods in one script?

Posted By: MaskOfZorro

Way to get series of different bar periods in one script? - 04/30/17 19:51

Say I wanted to calculate Bollinger bands on bars of different periods, e.g. 10 seconds, 1 minute, 5 minute, in the same script and have a trade condition using all of these, e.g. a tick above all three upper bands for a short entry point - is there a way to do this?

I've tried multiple run() functions of different bar periods to populate static variables but only the last run() function in the script appears to do anything, so I guess this isn't a way.

Thanks.
Posted By: Sphin

Re: Way to get series of different bar periods in one script? - 05/01/17 10:14

BarPeriod can only be set once, different periods can be handled with TimeFrame.
© 2024 lite-C Forums