I have a some code I am trying to write unit tests for. Creating DataSeries with test data is easy, but I have not found a way to create Bars or Positions with test data. I can create a Bars object with its constructor, but I don't see a way to create a Bars object with me specifying the values for the OHLC DataSeries. I am have a similar issue with Position. These tests are for a custom PosSizer I wrote.
Does anyone have a solution for unit testing code that depends upon specific values found in a Bars object or Position? Any help will be appreciated. Thanks in advance,
Jec
Size:
Color:
Inserting a custom Position object into Wealth-Lab's Positions collection will not work out if you're after that.
On how to create a Bars object and specify the values for the OHLC DataSeries, see the QuickRef for Bars object > SaveToFile example.
Size:
Color:
Thanks Eugene. I think that is exactly what I needed.
Size:
Color:
You're welcome.
Size:
Color: