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,
ExcelLink Addon [SOLVED]
-
- Posts: 36
- Joined: 24 Apr 2012
- Has thanked: 6 times
- Been thanked: 2 times
Re: ExcelLink Addon [SOLVED]
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).
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).
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 125 times
Re: ExcelLink Addon
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)
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)
-
- Posts: 36
- Joined: 24 Apr 2012
- Has thanked: 6 times
- Been thanked: 2 times
Re: ExcelLink Addon
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.
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.
-
- Posts: 36
- Joined: 24 Apr 2012
- Has thanked: 6 times
- Been thanked: 2 times
Re: ExcelLink Addon
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.
Being able to do this would be good since then you would only need one indicator.
-
- Posts: 6
- Joined: 24 Mar 2015
Re: ExcelLink Addon
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.
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.