WL crash after placing order
Author: Gamba
Creation Date: 3/8/2012 9:33 AM
profile picture

Gamba

#1
Hi,

I activate a strategy of mine which generated orders for today. Data was updated till yesterday.
There are several limit-order alerts. I can stage them, but if I want to place any of them WL crashes
without a detailed message, only a popup, that WL will shutdown.

I'm working on PaperAccounts and tried all three of them, I tried with market-orders, I tried
to recompile the strategy, ... same behaviour. Is there a log file or something else where I can
the a detailed error message? What happened during placing? I only want to paper-trade my strategy.

The market is already open now, is there something special with this ...

Thx
Gamba

-----
Update: It's not the strategy, every order staged and then placed from chart seems
to crash WL ...
-----
profile picture

Eugene

#2
Which streaming data provider is enabled?
profile picture

Gamba

#3
Yahoo, I disabled the streaming data provider and placed the order again ... same crash.

Hm ... I am not able to deselct the streaming-provider under preferences.
It will always be selected after reopen the dialog.

Do I need a streaming provider for paper-trading and placing orders?
profile picture

Eugene

#4
Streaming provider can't be "deselected" after enabling, and that's not required. Yahoo is OK in this context, I was wondering if some other provider is involved.

Before creating a support ticket for debugging instructions, a couple more questions:

1. Does it happen with any symbol? Maybe some particular one(s)? Which one(s) have you tried?
2. If you create a new paper account, will WL crash after selecting it for placing?
profile picture

Gamba

#5
This morning us-market are still not open. I cannot reproduce the crash during
placing an order at the moment. With no chart and with no strategy.

Yesterday it happens with different symbols, different charts and multiple
paper accounts (1-3). I did not create a new one so far, but changed settings
of PA2 and PA3 of initial capital to $100,000.

I remember a dialog where I could change the exchange times, but actually
can not find it. Maybe if I change the trading-times for some symbols I can
reproduce the error. Or maybe after market open in a few hours.



profile picture

Eugene

#6
The "dialog" is probably the Market Manager's (Tools menu) Market Proiperties.
profile picture

Gamba

#7
I'm sorry Eugene, but this Addin is not installed. Maybe I saw it in my other WL-instance. I want to download the extension, but cannot find it under extensions / addins. Yes, I'm logged in, but I cannot see the MarketManager-AddIn.
profile picture

Eugene

#8
It is there, and it's not a separate extension. It comes out of the box as a component of the ASCII provider, for example (plus IQFeed, Google and half a dozen more).
profile picture

Gamba

#9
Eugene, I found it under IQFeed not at seperate provider addin, so I guess it is IQFeed specific.

At all I don't think that this will solve the problem described above. At the moment it works, but let's have a look at 15:30 GMT+1, at the opening of the market ...
profile picture

Gamba

#10
Since markets are open I am able to reproduce the error on multiple instruments,
only on 64Bit-System. On 32Bit-System I cannot reproduce the error and it never
occured there:

1.) Start WL
2.) Open "Channel Breakout VT" strategy and compile it
3.) Update data to 2012/03/08
4.) Select last 1000 bars in sizing panel
5.) Double-Click on a symbol for instance AMZN
6.) Inside the chart click on last bar 03/08 and try to place an order
7.) If order is staged and Auto-Trading is off, place this order

=> Booom ... WL crashes without warning and only a simple error-window:

WealthLabDev encountered a problem and has to be terminated ...
(Sorry I have only the german translation on my machine)

And that is exactly the behaviour for orders generated by my strategies.
So at the moment I am not able to place them, when market is open. The error did not
occur earlier this day, when markets are still closed.
profile picture

Eugene

#11
I religiously followed the (innocuous) routine on 64-bit WLD 6.3 several times, with or w/o auto-placement, and nothing happened.

There must be something else to it. Let's enable logging to see what happens.

0. Enable hidden file/folder visibility.

1. Shut down Wealth-Lab

2. In the ..\Data\Logs folder, if it exists, purge wld.txt. (See User Guide: Data > Where Data is Stored).

3. In the WLD installation folder, usually C:\Program Files\MS123\Wealth-Lab Developer 6, open WealthLabDev.exe.config with a text editor. About 2/3rd's the way down, look for this section:

CODE:
Please log in to see this code.




4. Change "level value" to <level value="All" />


5. Change this line:

CODE:
Please log in to see this code.



This way:

CODE:
Please log in to see this code.


6. Save and close WealthLabDev.exe.config

7. When the problem occurs, close Wealth-Lab and attach the wld.txt file from the ..\Data\Logs folder

8. Important!
When finished troubleshooting, repeat steps 3 thru 5, but change "level value" to < level value="Off">
Failure to do this could contribute to sluggish Wealth-Lab operation.
profile picture

Gamba

#12
wld.txt was created not in Data folder, instead it was created one folder above.
But wld.txt is totally empty. I tried log-leve All and log-level Debug and in every
case the wld.txt is empty. wld.txt is created on startup of WL but stays empty all the time.

I tried with other strategie "Trade Holidays" ... same error and an empty wld.txt file.
Different symbols ... same error ... maybe I should install WL again ... ?

CODE:
Please log in to see this code.
profile picture

Eugene

#13
Reinstalling WL6 is not something we suggest as a troubleshooting aid. Nonetheless, in this case we'll try it -- with a twist.

1. Uninstall 64-bit WLD.
2. Now, open c:\Program Files\MS123 (or where your 64-bit WL was installed) and rename the "Wealth-Lab Developer 6" folder. This way, I want to make sure that no installed (provider?) extension or 3rd party DLL is interfering with anything. Even though it's unlikely.
3. Install 64-bit WLD 6.3.14 from scratch.
4. W/o installing any extensions or re-configuring anything, try again.
profile picture

Gamba

#14
Ok, I reinstalled WL to the default path. In the prior installation I changed the installation path to another folder.
At the moment the markets are closed so everything works fins including order placement.

I will try again on monday. Maybe the installation path caused the error?
profile picture

Cone

#15
I was able to duplicate the crash on one machine's installation, but only if WealthLab.Visualizers.Extra (Monte Carlo-Lab and Analysis Series) was installed. There's no obvious connection with Placing an order with that Visualizer, and, the problem doesn't occur on other machines with the same Visualizer installed.

In short, if the problem is that same, it's somehow related to WealthLab.Visualizers.Extra. On Monday, test it without (first) and with that Extension, and let us know what you find. tia.
profile picture

Eugene

#16
@Cone
It's important to highlight in this context that you tested placing from a pure Chart window, where Wealth-Lab never loads a visualizer.

@Gamba
I was unable to reproduce the issue on different operating systems using WL 6.3 x64 / x86. But we're working on collecting more evidence/clues.
profile picture

Cone

#17
To be even more precise, I was Staging the order from a Chart window, and the crash occurred after Placing the order from the Orders tool.
profile picture

Eugene

#18
A little bird (read: our code wizard) just told me he might have an insight into the problem.
profile picture

Cone

#19
That little bird is an owlet, i.e. very wise.
profile picture

Gamba

#20
I deinstalled WealthLab.Visualizers.Extra_2012.03 first and after that Community.Visualizers_2012.03.1
after market opening the same error occured. After placing the order, WL crashes ...

After re-installing the addins the error still occurs. I don't think that this behaviour belongs
to the two addins ...

Hm, so at the moment I'm not able to update or place orders during market is open. Another testcase
is to place an order before market is open and updte the order after market is closed.
I will test it tomorrow.
profile picture

Eugene

#21
Good news: it seems that the developer in charge was able to duplicate the bug and work on a patch.
profile picture

Gamba

#22
Nice
profile picture

Cone

#23
Please give this a try today.

1. Close Wealth-Lab Dev.
2. Download and unzip this Paper Provider revision replacing the file in the main WLD installation folder.
For most installations >> C:\Program Files\MS123\Wealth-Lab Developer 6

(You will need Admin permissions for this operation. In Win 7, click "Continue" when you get the warning.)

Let us know if it works out for you. tia.
profile picture

Gamba

#24
I have placed an order outside trading session. I will wait for market opening to update this order.

@Cone
I will give it a try today with the new PaperProvider.
profile picture

Gamba

#25
Bad news: The formerly placed order caused a crash of WL right after market opening.

Good news: The new .dll file seems to fix this bug. After restarting WL with the new .dll
I can place orders, close them and place again on other symbols.
profile picture

Cone

#26
I think that's all good news then, because it showed that you still had the problem today but resolved it by replacing the component that we identified as causing the error.

Thanks for identifying the problem and sorry for the inconvenience!
profile picture

Gamba

#27
One additonal question. Will there be a bugfix including this component or
will it be included in further versions of WL?
profile picture

Cone

#28
You already have the final fix, so no further action is required.

By tomorrow evening, the 6.3.14 build installation will have this change. We can't change the build number at this point, just the install.
profile picture

Gamba

#29
Ok, thank you for the great support.
profile picture

aykuts

#30

Hi,

- I coded one MySql Database on one side (which is being fed with 1-minute data from another/independent system). (I gave particular attention to the format, data quality and the column data definitions of this data table in a bit to ensure that the problem that I will talk about shortly has nothing to do with the peciluraties of the mysql table and tick data.)

- Then, I successfully created a DataSet on WealhLab (with data provider being the Database) with appropriate configuration, connection string etc.

- Then, clicked one ticker from the MySql DataSet, and observed that the chart is filled successfully with the right tick data, and it is updated (in a static fashion as the chart is refreshed whenever I re-click the ticker from the left-side drop-down menu)

- Finally, I clicked Data Manager > Database provider tab > and configured successfully the streaming data properties.

- As a test, I coded a very simple testing strategy (to test whether my data stream operates properly) that `buys when the tick data of the bar is higher vs. the previous bar, and sells visa versa' (As you might observe, this strategy is devised only to test if data stream is fine and if the alerts are adequately transformed into paper orders)

- And, finally, I opened the Strategy monitor menu, added my `test strategy` into the list, and clicked my MySql datastream, and weighted for the next minute to observe if the trade alerts this simple strategy generated would convert into paper trades (that would consume my paperaccount1)

- WHAT HAPPENS IS THAT, WHENEVER THE STRATEGY GENERATES ONE ALERT TO BUY, THE SOUND (OF TRADE ALERT) IS HEART, BUT, WEALTHLAB, WITHOUT SHOWING ANY SIGNS OF THE COMPLETION OF PAPER ORDERS, CRASHES.

I repeated this process for
- alternative dataset provider setup (eliminating all tickers but leaving 1 to simplify the data structure, dealing with 5 min data instead of 1)
- alternative strategies (allowing long only, considering 2 bars instead of one, replacing `close` of the bar with `open` of the bar, etc.
- and alternative account settings.

In ALL OF THE CASES, the wealthlab, whenever the strategy generated an alert, crashed with no clear error message.

**

What might be the issue here?

**

If it helps, I did my best to capture my mouse and keyboard strokes for the whole of the process I defined above, using Windows 7's capture utility.

I walked through this thread as well as others in the forum, and could not find much about possible remedies of `wealthlab crashes when strategy monitor is launched together with a database provider'

Thank you all for your interest in advance.

Aykut Saribiyik

profile picture

Eugene

#31
First, let's make sure that certain configuration files do not have an error. With WLD closed, delete two files StrategyMonitorConfiguration.xml and Orders.xml from this folder:

c:\Users\username\AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\

(Make sure that hidden file/folder visibility is enabled in Windows Control Panel > Folder Options.)

After restart of WLD, you'll need to reconfigure the Strategy Monitor tool. Here, 1) switch to a different provider AND bar scale (I recommend Yahoo and EOD data) and 2) take a 'canned' Strategy, preferably "Moving Average Crossover". We need to make sure we're not troubleshooting an error in your code.

Next, right click on the Strategy in the SM and activate logging for the selected item. (The log will be kept in the file SCLog.txt which can be found in the folder above.)

Any changes?
profile picture

Cone

#32
QUOTE:
What might be the issue here?
When an order is placed, the Paper trader starts requesting level 1 quotes periodically from the specified Streaming Data Provider. For market orders, just one quote request is required to fill the order.

An exception could be occurring in your MySQL provider, and that could cause Wealth-Lab to crash. To me it seems to be the most likely place to start troubleshooting.
profile picture

Eugene

#33
Good idea Cone. (Actually, the Database provider is probably not being called by the PaperTrader because the provider does not implement an interface: Limitation: Paper Trading through Database provider is not supported)

Aykut,

In Wealth-Lab's Preferences > Streaming Data, uncheck "Database" (i.e. switch to a different streaming provider - preferably Yahoo) and retry. Does it still crash? I can not reproduce the crash but your mileage may vary (e.g. incorrect MySQL streaming configuration).

profile picture

aykuts

#34
Hi Eugene,

- I deleted those two files you mentioned,
- I have not touched to my database streaming,
- And, I modified the strategy as MAC as you have suggested

***

Here are the results:
'When auto-stage mode is OFF, and auto-trading is OFF, and strategy monitor is setup for SINGLE stock: Things went OK.
'When auto-stage mode is OFF, and auto-trading is OFF, and strategy monitor is setup for MULTIPLE stock: Things went OK.
(So, I run the rest of the tests with MULTIPLE stocks)

'When auto-stage mode is OFF, and auto-trading is ON, and strategy monitor is setup for MULTIPLE stock: Things went OK.
(So, I run the rest of the tests with MULTIPLE stocks and when the auto-stage mode is ON)

'When auto-stage mode is ON, and auto-trading is ON, and strategy monitor is setup for MULTIPLE stock: WEALTHLAB CRASHES!

***

So, the problem i suppose is neither the database design or its setup, nor the strategy, nor the strategy monitor; it is the AUTO-TRADING (as both of you have already addressed)

***

I met with wealthlab only a couple of weeks ago and I believe I am now following the usual path any newbie is evolving through - from starting to use this platform for simple charting purposes into utilizing wealthlab for much advanced tasks such as c# based coding, auto-trading and orders management.

I have not used the ORDER MANAGEMENT yet of this platform, so, let me familiarize myself further to this feature first, read the relevant sections of the user guide, and I will let you know if I cant sort this issue myself.

Thanks, once again, for your quick and helpful support.

Best regards,

Aykut


profile picture

Eugene

#35
Thanks for your reply. Please also make the quick test in my post #33 and let me know. As Cone pointed out, this might be an issue in the DB provider or PaperTrader.
profile picture

aykuts

#36
Eugene and Cone,

I repeated the test you provided at post33 as follows:

- i switched from database to other providers as you defined in post #33, and wealthlab crashes.
- i kept the database streaming and switched off 1) auto-staging, 2) auto-trading, and wealthlab did not crash after many alerts are produced.
- i changed the strategy from MAC to my simple testing strategy, and wealthlab did not crash.

So, overall, it is the PaperTrader (or, PaperTrader with db streaming) that brings in this crash.

For the moment, i switched off any sort of order and trading feature of the platform , and refocused on the algorithm design.

Once i consantrate back on Order Management issues, I will dig further the matter and let you know.

Best,
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).