- ago
I was exploring an idea using a building block strategy that uses ScaleInd. It will generate an exception if the strategy is edited and the data re-loaded.

WL 8 build is 34. Many extensions are loaded, and all of them are up-to-date as of 2023/04/09 (YYYY/MM/DD).

Strategy settings:
-------------------
Use a single symbol: for me, the error occurred for any of AMD, U and RBLX
Scale: 1 minute
Data Range: most recent 10 days
Filter Pre/Post market data: checked
Benchmark: SPY
Starting capital: 100,000
Position size: Percent of Equity - 50%
Margin factor: 1.0

Start with this initial strategy:

Run the strategy - no problem. For my tests, positions were generated.

Edit the strategy by changing just the ScaledInd indicator as follows (change the ScaledInd indicator for Close to AveragePriceHL. Although, you could use any of the basic prices (i.e. Low, High, etc.):

Run the strategy again - no results are generated, but perhaps that would be the case with the given data (I doubt it).

Now, force a data load by clicking "1 Symbol Loaded" in the lower left of the strategy window.

Save the strategy.

Run it. The following exception occurs:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at WealthLab.ChartWPF.PriceValuesLabel.AwakeSingleton()
at WealthLab.ChartWPF.PriceValuesLabel.set_BarNumber(Int32 value)
at WealthLab.ChartWPF.ChartPane.TriggerMouseMoveBarNumber(Int32 barNumber)
at WealthLab.ChartWPF.CoreChart.CreateFilter(Int32 num_task, ChartPane reg)
at WealthLab.ChartWPF.CoreChart.AssignBars(BarHistory value, Boolean setOffsetZero, Boolean force, Boolean calledFromStreaming)
at WealthLab.ChartWPF.CoreChart.set_Bars(BarHistory value)
at WealthLab8.cwStrategy.MoveHelper(BarHistory value, StrategyBase b)
at WealthLab8.cwStrategy.ChangeHelper(Object def, EventArgs pred)
at System.Windows.Threading.DispatcherTimer.FireTick()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
0
247
Solved
5 Replies

Reply

Bookmark

Sort
Glitch8
 ( 9.00% )
- ago
#2
Thank you, it's resolved for Build 35.
1
Best Answer
- ago
#3
I created the strategy with Build 34 on the same day I reported the exception. Hence, the strategy was not created nor saved with Build 33.

Also, the data source was TD Ameritrade - using latest build. I have only TD Ameritrade checked as a historical data provider. I have one event provider checked - Zacks for splits and dividends.

I'll see if I can dig up any more info.
0
Glitch8
 ( 9.00% )
- ago
#4
Please check Post #2.
0
- ago
#5
Looks like a cross-posting. Please ignore my response in Post #3.
0

Reply

Bookmark

Sort