Greetings,
I am trying to "pull" volume via DDE into Excel from a couple of 3min charts. Reading through the thread(s), I used one of the samples as a template, however I can't seem to get it to function correctly.
The value always remains at "0".
Here is the code;
var dde1 = null;
function preMain() {
setStudyTitle("Volume4 Test");
setCursorLabelName("Volume",0);
setPlotType(PLOTTYPE_HISTOGRAM,0);
}
function main() {
if (dde1 == null) {
var sName = ("Vol_" + getSymbol() +"_"+ getInterval());
sName = sName.replace("$", ""); // remove $ from string
sName = sName.replace("#", ""); // remove # from string
sName = sName.replace("-", ""); // remove # from string
sName = sName.replace(" ", "_") // replace space with underscore
debugPrintln("DDE Link for Excel =eSignal|EFS!"+sName);
dde1 = new DDEOutput(sName);
}
return getValue("Volume");
return dde1.set("Volume");
}
Here are some samples of syntax used in the worksheet:
=eSignal|EFS!Vol_GOOG_3
=eSignal|EFS!Vol_GBP_A0FX_3
Any ideas/feedback would be appreciated.
Axel
I am trying to "pull" volume via DDE into Excel from a couple of 3min charts. Reading through the thread(s), I used one of the samples as a template, however I can't seem to get it to function correctly.
The value always remains at "0".
Here is the code;
var dde1 = null;
function preMain() {
setStudyTitle("Volume4 Test");
setCursorLabelName("Volume",0);
setPlotType(PLOTTYPE_HISTOGRAM,0);
}
function main() {
if (dde1 == null) {
var sName = ("Vol_" + getSymbol() +"_"+ getInterval());
sName = sName.replace("$", ""); // remove $ from string
sName = sName.replace("#", ""); // remove # from string
sName = sName.replace("-", ""); // remove # from string
sName = sName.replace(" ", "_") // replace space with underscore
debugPrintln("DDE Link for Excel =eSignal|EFS!"+sName);
dde1 = new DDEOutput(sName);
}
return getValue("Volume");
return dde1.set("Volume");
}
Here are some samples of syntax used in the worksheet:
=eSignal|EFS!Vol_GOOG_3
=eSignal|EFS!Vol_GBP_A0FX_3
Any ideas/feedback would be appreciated.
Axel
Comment