Iterating Bars object between two datetime's.
Created at 20 Apr 2021, 11:28
Iterating Bars object between two datetime's.
20 Apr 2021, 11:28
I hope you can help me. I’ve not done any cAlgo before, but I have done a lot of c# and MT4.
How can I loop between two datetime’s to get the Highest ClosePrice?
For example, on a 1Min Backtest I want to say "get the Highest Bar ClosePrice between 6am today and 10am today".
I can see I need to the use Bars object, and I can see I am may be able to fashion something using Bars.OpenTimes. But what is the best way?
amusleh
20 Apr 2021, 16:49
Hi,
There are lots of ways to do what you are after, one simple option is to use Linq:
@amusleh