created bar query for simpleStrategy function