I am trying to write a strategy that will analyze the OHLC data for a contract and then output a file with all the values I’m interested in. Specifically, I want to analyze 3 months of minute data and have the strategy analyzer output the following values:
Date
Day of week
RTH Open, High, Low, Close
Overnight Open, High, Low, Close
Time of RTH High and Low
Time of ON High and Low
Opening range Open, High, Low, Close
I want to have one line per day containing all those values, each separated by a semicolon or comma. My plan was to then save the output window as a text file, open it in Excel, and then convert text to columns so I can analyze the data further.
I have very little experience coding so I’ve spent quite a bit of time reading the forums to try to figure out the best way of doing this. So, here’s my questions:
I read that using extensive Print() methods can be resource-intensive and may put Ninjatrader into a non-responsive state. I also saw that StreamWriter.IO is recommended for making txt files. If I’m only analyzing 3 months of data at a time (~60 days), is the StreamWriter.IO option still the right way to go, or is 60 days of data pretty manageable?
It looks like much of the code for making this sort of strategy is already written in the indicator “SampleGetHighLowByTimeRange.cs” posted on this thread. Unfortunately, this is an indicator and I need to get it into a strategy. If I just used the Strategy Wizard to make a generic strategy and then copied the Indicator code into the strategy, would that work? Or is it a lot more complicated?
Thanks
Sniff
Comment