Is "Bars out of the market" available in AFL?

I came across "Bars out of the market" in the description of the old backtester. Is this calculation still available in AFL?

Thanks.

Simplest way via AFL possibly would be these two lines:

open_pos = Foreign("~~~EQUITY", "I");
bars_out_market = Cum(open_pos == 0);
1 Like

Thank you so much for that answer. It worked perfectly! I appreciate your kind attention to my question. Thanks again! Cheers!

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.