ExcelLink Addon  [SOLVED]

Questions about MultiCharts and user contributed studies.
pschriber2
Posts: 36
Joined: 24 Apr 2012
Has thanked: 6 times
Been thanked: 2 times

ExcelLink Addon

Postby pschriber2 » 20 Sep 2012

I'm trying to use the ExcelLink Addon DLL from FX1.net to transfer data from MultiCharts to Excel. I'm having trouble sending data from multiple Charts, and different time frames.

I believe that the ExcelStart( ) function is causing the problem. Since this function is called everytime the indicator is turned on. So if I'm applying a indicator using the ExcelLink Addon on 4 charts, it will attemp to open the excel file 4 times.

Does anyone know how to get around this problem?

Any help would be appreciated.

Thanks,

acanedra
Posts: 1
Joined: 17 Sep 2012
Been thanked: 1 time

Re: ExcelLink Addon  [SOLVED]

Postby acanedra » 21 Sep 2012

Hi pschriber2

You can try to read the ExcelLink documentation and see if there is any other function or method that will allow you to detect if an excel file has been opened for access previously in another chart. If there is such a function you can write a condition that will make it open the excel file only once.

Another option would be to only put the code to open the excel file in one master chart.
You do this by writing two indicators.
One indicator code will be used for a "master chart", in where this "master chart indicator code" you put the instructions to open the excellink file.
The second indicator code is similar to the one above, but instead, you remove the instruction to open the excellink file and leave the rest the same.
This way, you just open a chart with the "master chart indicator code" first and then open the other charts containing the "second indicator code" that has the "open the excellink file" instructions removed.

I am not sure it will work, since I have never used this excellink before.

I have another option that you could try which involves using globalvariables to make it act as a switch to your excellink, but I will tell you how to do it once you have finished trying the two options above.(I don't want to confuse you with too many options).
These users thanked the author acanedra for the post:
pschriber2

evdl
Posts: 399
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 84 times
Been thanked: 123 times

Re: ExcelLink Addon

Postby evdl » 21 Sep 2012

Maybe the use of the reserved word "once" may help you.

If you put this in front of the section in your strategy which opens the excel file, it will only open this once (for example when you open the chart or when you select the signal off/on status button)
These users thanked the author evdl for the post:
pschriber2

pschriber2
Posts: 36
Joined: 24 Apr 2012
Has thanked: 6 times
Been thanked: 2 times

Re: ExcelLink Addon

Postby pschriber2 » 21 Sep 2012

Thanks for the input evdl and acandra.

I am aware of the once keyword, but the issue is that I have to add the strategy for each subchart. The once only applies for running the indicator once for each chart, so it doesn't work.

I ended up using a method similar to what acanedra described. Which consisted of using 2 similar indicators but one not having the open excel command.

pschriber2
Posts: 36
Joined: 24 Apr 2012
Has thanked: 6 times
Been thanked: 2 times

Re: ExcelLink Addon

Postby pschriber2 » 21 Sep 2012

And as far as ExcelLink having a command to check if a spreadsheet is open, I'm not aware of any methods to do this. I browsed the documentation but couldn't see anything on it.

Being able to do this would be good since then you would only need one indicator.

Bundscalper1
Posts: 6
Joined: 24 Mar 2015

Re: ExcelLink Addon

Postby Bundscalper1 » 24 Mar 2015

Hi pischriber2,

I have tested today excellink with MC64 9.0 and Excel 2003 on my Win7 64bit PC

I wrote a little indicator code for testing. I was only able to send reamtime data to Excel. Data from Excel to MC does not work. Also strange behavoir with strings. Only the 1st character of the string arrives in Excel.
As FX1 does not support excellink anymore I hope we can exchange some code and experience.

Perhaps we can do this via direct email. I am happy to share my code

PS: tried before new xlsgate but had no luck. need to get excel2010 or 2013. This is only
Supported by FX1.


Return to “MultiCharts”