Jason Posted April 23, 2021 Report Share Posted April 23, 2021 I am using the following code: public void MainCalculation() { if ( Close[1] >= High[1] - .10*(High[1] - Low[1]) ) { SetColorAndShape(0x4dc4b6FF, PBShape.Fill); //TriggerAlert("OF", @"OF"); SetScanResult(@"OF"); } if ( Close <= Low[1] + .10*(High[1] - Low[1]) ) { SetColorAndShape(0xa33c14FF, PBShape.Fill); //TriggerAlert("OF", @"OF"); SetScanResult(@"OF"); } } And it's producing this error: Medved Trader encountered an Error Array dimensions exceeded supported range. Please contact Medved Trader technical support and provide the error details AppVer: 1.1.9300.1 Err.Flags: Log, ShowIndicator, ShowToUser System.OutOfMemoryException: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at MT.Charting.Editor_Paintbar.<OnParameterChanged>d__9.MoveNext() in [ROOT]\Charting\Paintbars\Editor_Paintbar.cs:line 105 Second attempt, couldn't get the code to go through the first time. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted April 24, 2021 Report Share Posted April 24, 2021 yeah, you found a bug I will fix the bug. Meantime do this: (add the the 0, at the start) SetColorAndShape(0, 0x4dc4b6FF, PBShape.Fill) Quote Link to comment Share on other sites More sharing options...
Jason Posted April 24, 2021 Author Report Share Posted April 24, 2021 I'm glad I found a legitimate bug. It was hiding before but now we can squash it. In the interim it's functioning now with the workaround. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.