I am looking to create a list of the last x bars and count how many of the bars within the lookback period are up bars and how many are down bars. Could someone please kindly point me towards a method or logic that would help me achieve this? Do I need to create a loop of some kind that counts up the index from the oldest relevant bar? If so, what is the logic for that? Etc...
Thanks, community. Any logic samples or links to relevant NinjaScript reference pages would be much appreciated.
Comment