How to export the selection(symbols) to excel
Author: tradercn
Creation Date: 11/28/2011 12:29 PM
profile picture

tradercn

#1
Based on lrs10 and lrs20 (I got that idea from the example shows in Linear Regression Slope) of Indices, when both of them are greater than zero, I start to plan to trade stocks. At that moment, I would like to choose top 10 or 20 symbols with highest correlation from one existing dataset, and export them to excel. but how to export them to excel please? Is there any example for that? Thanks.
profile picture

Eugene

#2
First and natural question, what is the point of exporting to Excel? i.e. what do you think WL can't do that Excel can?

Next, decide what does "to export" mean. To a file:

* Export2ASCII in Community.Components

...or to an open Excel sheet:

* FAQ: Is there a way to read/write values to an open Excel sheet?
profile picture

tradercn

#3
The 1st link is not what I want. The 2nd link does not exist.

The reason I want to export data to an excel spreadsheet is because of my special requirement. You might be able to give me a better solution without excel. As I mentioned above, after I got the top 10 or 20 symbols with highest correlation from the existing dataset, what I want to see is, a symbols list window is poped up. This window integrates several indicators data. I can click these symbols to show its chart just as clicking the symbols in any Dataset in Data Panel. After I double click one symbol, then this trading strategy keep going on with this symbol. Is that possible? Or, I have to export to an excel spreadsheet to do the same thing manually. If it is possible, is there any code example? Thanks.
profile picture

Eugene

#4
Fixed the 2nd link, although according to your explanations (which I can not fathom), it's still not what you're looking for. I don't get how exporting to an Excel spreadsheet would let a WealthScript Strategy keep going on with this symbol. Just doesn't ring a bell to me.

Try this out: Correlation Matrix
profile picture

tradercn

#5
Thanks so much for your help. Basically I understand WLD programming concept so far with your help.
But how to reference COMs in WLD? Can I use forms and controls I designed in VS 2010?
If I create a windows form, click one button, then a new WLD chart screen instance is popup. Or, click one button, then several charts of different interval are showed. Is that possible to write such a program as strategy? If yes, do you have any example code?
Thanks again for your consistent help. :)
profile picture

Eugene

#6
I'm not sure how will you accomplish the complex task of integrating WinForms in your strategy as you just described. Essentially, Wealth-Lab Developer is a systematic backtesting platform so the idea not necessarily fits in. Try searching for hints in these old threads:

Threading and MessageBox?
WL5 : Showing a Windows Form from a strategy script
profile picture

tradercn

#7
Thank you, Eugene. You did help me a lot. :)
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).