Excel Class  [SOLVED]

Questions about MultiCharts and user contributed studies.
Harvey Wallbanger
Posts: 9
Joined: 13 Oct 2013
Has thanked: 2 times

Excel Class

Postby Harvey Wallbanger » 13 Oct 2013

I have imported into PowerLanguage Editor an ELD written by TS called _Demo_ExcelClass which can be used in TS to communicate with Excel. Was hoping to do the same in MC but PE gives me "compiled with error."

Interestingly, I get a different something "expected" when I try to compile the same language in a PE Indicator and in a PE Strategy.

In any case, is the problem that PowerEditor simply isnt programmed to offer Excel Class, or does it require some different coding. I cant find any reference to this topic in your blogs.

If Excel class doesnt work in MC, then does MC provide an alternative to pluck data in a real time basis out of excel?

Thanks.
Attachments
_DEMO_EXCELCLASS_V00.ELD
(14.18 KiB) Downloaded 396 times

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Excel Class

Postby arjfca » 14 Oct 2013

I have imported into PowerLanguage Editor an ELD written by TS called _Demo_ExcelClass which can be used in TS to communicate with Excel. Was hoping to do the same in MC but PE gives me "compiled with error."

Interestingly, I get a different something "expected" when I try to compile the same language in a PE Indicator and in a PE Strategy.

In any case, is the problem that PowerEditor simply isnt programmed to offer Excel Class, or does it require some different coding. I cant find any reference to this topic in your blogs.

If Excel class doesnt work in MC, then does MC provide an alternative to pluck data in a real time basis out of excel?

Thanks.
Hello Harvey

Witch MC version are you using? The regular one won't work with Excel Class application. For that, you will need the MC.Net

To communicate with Excel, I'm using ELXL functions. Look on the forum for the link to install it. While this is not the greatest tool, it do work

If you use it, don't forget
- Only one instance of Excel opened at the time
- Only one workspace having the Elxl function loaded at the same time

To overpass these limitation, I use the global variable to get the informations from other workspace that need to be send to Excel

Also, a trick that I coded. In Excel, I did wrote some line that when Excel do open up, it read the name of the file and the tab. This information is saved in a global variable. In MC, the first thing that I do is to read the Excel link in Global variable. This ensure that whenever I do a change in my Excel sheet and put a new name on the file, I'm in sync with MC link to Excel.

Good luck
Martin

Harvey Wallbanger
Posts: 9
Joined: 13 Oct 2013
Has thanked: 2 times

Re: Excel Class

Postby Harvey Wallbanger » 14 Oct 2013

Martin,

Many thanks for sharing your experiences and knowledge on this matter. You confirm my suspicion that Excel Class doesnt work in MC, though Im happy to learn that the .Net version can handle it.

I will need to mull over the choices before me, which your post kindly clarifies.

One work around would be to open many charts and feed certain information from them into my strategy working in the Data1 chart. I cannot find in the documentation just how many charts can be referenced by a strategy.

Do you happen to know if I could reference data2 all the way to data100, or even more? I would be grateful if you could tell me what the cap is in the MC software for the number of charts that can be referenced like this.

Thanks again.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Excel Class

Postby arjfca » 14 Oct 2013

I don't have that information about how many data MC could handle. You may have a chat with MC support about that.

As mentioned, I'm using 2 data stream on the master + using global variables on 7 charts with up to 2 data stream on each chart for a maximum of 16 instruments.

My only problem is the master one do have some kind of memory leak where it's file do grow much faster than the slave one. To overcome this, I need to close the master workspace at least once a day.

MC as a known limitation on the 32 version regarding the file size limitation. MC 64 does have a greater possibilities, but have not tried it.

Putting 100 instruments will probably triggered the file limitation very early in the process.

Martin
Martin,

Many thanks for sharing your experiences and knowledge on this matter. You confirm my suspicion that Excel Class doesnt work in MC, though Im happy to learn that the .Net version can handle it.

I will need to mull over the choices before me, which your post kindly clarifies.

One work around would be to open many charts and feed certain information from them into my strategy working in the Data1 chart. I cannot find in the documentation just how many charts can be referenced by a strategy.

Do you happen to know if I could reference data2 all the way to data100, or even more? I would be grateful if you could tell me what the cap is in the MC software for the number of charts that can be referenced like this.

Thanks again.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Excel Class  [SOLVED]

Postby Henry MultiСharts » 18 Oct 2013

I have imported into PowerLanguage Editor an ELD written by TS called _Demo_ExcelClass which can be used in TS to communicate with Excel. Was hoping to do the same in MC but PE gives me "compiled with error."
Hello Harvey,

The ELD file you have provided will not work with MultiCharts (and MultiCharts .Net) as it utilizes EL Object Oriented programming features that is not curently supported. In order to make it work with MultiCharts - you need to move the EL Object Oriented code into an external DLL, that will be referenced from PowerLanguage code.

Alternatively you can follow Martin's suggestion and use ElExcel.dll that can be found for free over the Internet.
Do you happen to know if I could reference data2 all the way to data100, or even more?
You can have up to 99 additional data series on the same chart.

Harvey Wallbanger
Posts: 9
Joined: 13 Oct 2013
Has thanked: 2 times

Re: Excel Class

Postby Harvey Wallbanger » 18 Oct 2013

That what I needed to know. Many thanks, Henry!

User avatar
piranhaxp
Posts: 241
Joined: 18 Oct 2005
Has thanked: 4 times
Been thanked: 30 times

Re: Excel Class

Postby piranhaxp » 22 Oct 2013

You may want to try out http://www.fx1.net Excel-MC Solution.


Return to “MultiCharts”