Anyone know how to use the DDE links to pull studies on spreads?
I am trying to pull the ATR, (from the Daily chart), on 3.5IPI - POT
As an example, I've tried using the following code to pull a SMA on GOOG/AAPL, (this was from a previous post - still not getting this to work):
var ddeSMA12 = null;
var vMA = new MAStudy(12, 0, "Close", MAStudy.SIMPLE);
function preMain() {
setPriceStudy(true);
setStudyTitle("DDE SMA12");
setShowCursorLabel(false);
}
function main() {
if (ddeSMA12 == null) {
var sName = "SMA12" + getSymbol("GOOG / AAPL") + getInterval();
sName = sName.replace("$", ""); // remove $ from string
sName = sName.replace("#", ""); // remove # from string
sName = sName.replace(" ", "_") // replace space with underscore
sName = sName.replace(".", "_") // replace DOT with underscore
sName = sName.replace("-", "_") // replace dash with underscore
sName = sName.replace("/ ", "_") // replace STROK with underscore
debugPrintln("DDE Link for Excel =eSignal|EFS!"+sName);
ddeSMA12 = new DDEOutput(sName);
}
var vSMA12 = vMA.getValue(MAStudy.MA);
if (vSMA12 == null) return;
ddeSMA12.set(vSMA12);
return vSMA12;
}
I am trying to pull the ATR, (from the Daily chart), on 3.5IPI - POT
As an example, I've tried using the following code to pull a SMA on GOOG/AAPL, (this was from a previous post - still not getting this to work):
var ddeSMA12 = null;
var vMA = new MAStudy(12, 0, "Close", MAStudy.SIMPLE);
function preMain() {
setPriceStudy(true);
setStudyTitle("DDE SMA12");
setShowCursorLabel(false);
}
function main() {
if (ddeSMA12 == null) {
var sName = "SMA12" + getSymbol("GOOG / AAPL") + getInterval();
sName = sName.replace("$", ""); // remove $ from string
sName = sName.replace("#", ""); // remove # from string
sName = sName.replace(" ", "_") // replace space with underscore
sName = sName.replace(".", "_") // replace DOT with underscore
sName = sName.replace("-", "_") // replace dash with underscore
sName = sName.replace("/ ", "_") // replace STROK with underscore
debugPrintln("DDE Link for Excel =eSignal|EFS!"+sName);
ddeSMA12 = new DDEOutput(sName);
}
var vSMA12 = vMA.getValue(MAStudy.MA);
if (vSMA12 == null) return;
ddeSMA12.set(vSMA12);
return vSMA12;
}