Announcement

Collapse
No announcement yet.

DDE Link to Excel - Continuous Contract

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DDE Link to Excel - Continuous Contract

    I have an EFS formula (listed below) that links to Excel. It posts the MA data into Excel and works for all futures contracts with "normal" symbols - e.g., YM H5. The Excel formula to the link is, for example: (eSignal|EFS!MA20YM_H55) - that would return the 20 period moving average on a 5 minute chart that was saved as YMH5-05.

    I would like to be able to do this for continuous contracts as well - i.e., symbol YM #F. Excel does not permit a formula of (eSignal|EFS!MA20YM_#F5*100) since I believe Excel reads "#" as a function.

    How can I alter the code below to accomplish this? Thanks in advance for a prompt response
    ============================

    var ddeMA20 = null;

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("DDE MA20");
    setShowCursorLabel(false);
    }

    function main() {
    if (ddeMA20 == null) {
    var sName = "MA20" + getSymbol() + getInterval();
    sName = sName.replace(" ", "_");
    ddeMA20 = new DDEOutput(sName);
    }

    var vMA20 = call("/library/ema.efs", 20);
    if(vMA20 != null) ddeMA20.set(vMA20);

    return;
    }

  • #2
    TBond
    See the example posted by Jason in this message
    Alex

    Comment


    • #3
      Alex,

      Thanks for the prompt reply - I'll give taht a try.

      Comment

      Working...
      X