mjj38
- ago
I've been having problems opening metastrategies after they have been saved. Any clues to what I am doing wrong?


System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at WealthLab.Core.Tokenizer..ctor(String source)
at WealthLab.Backtest.MetaStrategy.Parse(String s)
at WealthLab.Backtest.Strategy.CreateInstance()
at WealthLab8.cwStrategy.PublishSpecification(Boolean isitem)
at WealthLab8.cwStrategy.NewSpecification()
at WealthLab8.cwStrategy.set_Strategy(Strategy value)
at WealthLab8.MainWindow.OpenStrategyWindow(Strategy s, Boolean fromQuickRef, SavedOptimizationResults sor)
at WealthLab8.pnlNavStrategies.PrepareComparator(Strategy item, Boolean readattr)
at WealthLab8.pnlNavStrategies.ForgotComparator(Boolean outputreference)
at WealthLab8.pnlNavStrategies.AddComparator(Object instance, MouseButtonEventArgs pred)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Control.OnMouseDoubleClick(MouseButtonEventArgs e)
at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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
238
11 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.81% )
- ago
#1
Can you email us one or more offending strategies so we can have a look?
0
mjj38
- ago
#2
It's a metastrategy with 10 strategies in it.
0
- ago
#3
Can you get to opening a saved MS normally if it contains a couple of canned WL Strategies?
0
mjj38
- ago
#4
Yes I can. The problem tends to arise after I restart WL and try to reopen the MS.
0
Glitch8
 ( 11.81% )
- ago
#5
I'd be interested to hear if it continues to occur after Build 62, because some of the formats have changed there. After saving a MS in B62 and re-opening it, if you experience the issue, please mail a Strategy over. It's OK that we don't have the constituent Strategies, it will help us troubleshoot this.
0
mjj38
- ago
#6
Sound good. Thank you
0
mjj38
- ago
#7
I think it has to do with the metastrategy being locked. If I don't lock the metastrategy I don't seem to have the same issues so far.
0
- ago
#8
Cannot reproduce. I can successfully load and run a locked MetaStrategy comprised of locked child Strategies upon restart of WL8.
0
- ago
#9
@mjj3 - Try the following:

Open each strategy independent of the meta strategy.

For each strategy opened:
Check if any errors occur upon opening by checking the log viewer.
Check if the parameters are ok.
For a C# strategy, check that it compiles ok.

If you get an error(s) then correct them. Close your meta strategy and re-open it.
0
mjj38
- ago
#10
I tried each strategy independently and they are all okay. Does the metastrategy load all the strategies at once or does it iterate through a list. If it's the later maybe it can spit out an error with which strategy it is having trouble with?
0
- ago
#11
@mjj3 - I'm an end-user, so I don't know the answer to your question about whether it iterates through a list or multi-threads to load them. (I'm guessing its not worth it to multi-thread load the strategies.)

In any case, the only hook I know of that would allow you to see if you can track down the potentially offensive strategy is via the strategy constructor. Hence, all your strategies would have to be C# strategies to apply the hook. Below, is an example strategy constructor:

CODE:
public SimpleAcceleration() { System.IO.File.AppendAllText($@"C:\Users\{Environment.UserName}\Documents\WL8Init.txt", $"{StrategyName} constructing"); // parameter creation here... // ... // ...parameter creation complete // if it makes it here, the strategy construction is ok, but after that it depends on what WL8 does with the strategy instance System.IO.File.AppendAllText($@"C:\Users\{Environment.UserName}\Documents\WL8Init.txt", $"{StrategyName} constructed"); }


So, if you get output in the WL8Init.txt file (see code above) about the construction starting, but not constructed then that may be the problem strategy.

The thing is, the meta strategy, aside from the strategies it contains, might have a bad setting that's causing the exception. So, the above wouldn't be particularly useful.
0

Reply

Bookmark

Sort