MIH8
- ago
Hello.

I have a compiled strategy that I run in debug mode from VS. When I start the strategy in WL, I can configure the settings for the strategy as usual. E.g. with pre/post market filter, setting scale, range and so on. This works.

Now I want to save these settings. When I click on the save button, the saving process is executed. Unfortunately, the settings are not reloaded the next time. There are two scenarios.

1st scenario: After saving I stop debugging, so WL is closed. When I enter debug mode again and start the strategy, the settings are reset.

2nd scenario: I close the strategy window and start it again (without exit of WL). This immediately causes an exception

.

Can you help me and tell me how to save the settings for the compiled strategy?

The reason why this is important is that when I drag the strategy to the SM, I see no possibility to set parameters again. So they have to be saved before. In particular, I am concerned about the item pre/post market filter, which is checked and which I want to disable before dragging the strategy into the SM.
0
274
4 Replies

Reply

Bookmark

Sort
- ago
#1
Hi,
QUOTE:
2nd scenario: I close the strategy window and start it again (without exit of WL). This immediately causes an exception

Could you click "Copy to clipboard" and paste the stack trace here?
0
MIH8
- ago
#3
System.NullReferenceException: Object reference not set to an instance of an object.
at (Object )
at SerializerInvocation.ViewWorker(Object , SerializerInvocation )
at WealthLab8.designerCompiled.UpdateUIFromStrategy()
at WealthLab8.cwStrategy.CustomizeFactory(Object )
at WealthLab8.cwStrategy.FlushMerchant()
at WealthLab8.cwStrategy.onLoad(Object sender, RoutedEventArgs e)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
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
- ago
#4
Covered the code with some protection against this exception. Not sure if it went into B15 though. If it won't work in B16 then we'll need to mark this for investigation.
0

Reply

Bookmark

Sort