Announcement

Collapse
No announcement yet.

EFS for DDE output to Excel

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

  • EFS for DDE output to Excel

    Hi

    I have created the following formula for exporting eSignal data; but unfortunately it does not work and would appreciate if any one can help with suggestions to get it working. Although, the syntax check does not show any errors, but I am not able to get the output to Excel. The call from excel to get RSI data is =eSignal|EFS!RSI nifty n0-nsf _d -1 (nifty = indian index future symbol; n0 = july 2010 month; nsf = indian futures exchange; _d = daily internaval bar; -1 = previous days bar) but the output I get in excel is #NAME?, please help. Many thanks.

    ---------------------
    var ddeRSI = null;
    function preMain() {
    setPriceStudy(false);
    setStudyTitle("Data Export to Excel");
    setShowTitleParameters(false);
    askForInput()
    }
    function main() {
    if (ddeRSI == null) {
    ddeRSI == rsi(9);
    var sName = "RSI"+ getSymbol() +"_"+ getInterval() +"_"+ getBarState();
    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("RSI Link for Excel =eSignal|EFS!"+sName);
    ddeRSI = new DDEOutput(sName);
    }
    return;
    }

    ----------------------

  • #2
    Re: EFS for DDE output to Excel

    BB
    There are a several coding errors in your script [note that these are not syntax errors which is why you are not getting any syntax error messages]
    Also you are not using the DDE Output Object correctly and are not setting any value using the set() method to pass the values to Excel
    As a first step towards correcting your script I would suggest that you review this article in the EFS KnowledgeBase on the DDE Output Object. This will provide you with a basic understanding of the necessary construct. In that article you will also find a link to a complete example of a routine that will replace special characters or spaces from the identifier string
    You can also find another complete working example in this post in which all you need to do is replace the atr() study with the rsi() study. If you then want to output the previous value replace the 0 in var datr = tt4.getValue(0); with -1 ie var datr = tt4.getValue(-1);
    Alex


    Originally posted by BB
    Hi

    I have created the following formula for exporting eSignal data; but unfortunately it does not work and would appreciate if any one can help with suggestions to get it working. Although, the syntax check does not show any errors, but I am not able to get the output to Excel. The call from excel to get RSI data is =eSignal|EFS!RSI nifty n0-nsf _d -1 (nifty = indian index future symbol; n0 = july 2010 month; nsf = indian futures exchange; _d = daily internaval bar; -1 = previous days bar) but the output I get in excel is #NAME?, please help. Many thanks.

    ---------------------
    var ddeRSI = null;
    function preMain() {
    setPriceStudy(false);
    setStudyTitle("Data Export to Excel");
    setShowTitleParameters(false);
    askForInput()
    }
    function main() {
    if (ddeRSI == null) {
    ddeRSI == rsi(9);
    var sName = "RSI"+ getSymbol() +"_"+ getInterval() +"_"+ getBarState();
    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("RSI Link for Excel =eSignal|EFS!"+sName);
    ddeRSI = new DDEOutput(sName);
    }
    return;
    }

    ----------------------

    Comment


    • #3
      EFS for DDE output to Excel

      Thanks Alexis

      As suggested, I downloaded the ATR EFS script, but the call in excel (=eSignal|EFS!ATRNIFTY_N0NSF_15) returns '0' value for 15 minute chart; but the ATR value in chart shows '10.18' and hence I am unable to use.

      Any help on this will be appreciated.

      Many thanks in advance.
      BB

      Comment


      • #4
        Re: EFS for DDE output to Excel

        BB
        I just tested that script and at my end it is returning the expected value in Excel as you can see in the image enclosed below
        I would suggest that you review the thread I linked as you may be using the incorrect formula
        Alex





        Originally posted by BB
        Thanks Alexis

        As suggested, I downloaded the ATR EFS script, but the call in excel (=eSignal|EFS!ATRNIFTY_N0NSF_15) returns '0' value for 15 minute chart; but the ATR value in chart shows '10.18' and hence I am unable to use.

        Any help on this will be appreciated.

        Many thanks in advance.
        BB

        Comment


        • #5
          EFS for DDE output to Excel

          Thanks Alex,

          Yes, it did work. Many thanks.

          However, one issue remains that how do I get these values for all the 26 bars in a day (assuming I am working on a 15minute chart) without changing the script each time but calling them in excel with 0, -1, -2; where 0 = current bar and -1 for previous bar and hence forth.

          Since, I would be interested in doing this output to Excel for Volume, EMA, MACD and RSI, your confirmation if the same ATR EFS will work (by replacing the study name in place of ATR) for most of my requirement would be helpful.

          Many thanks for your kind help.

          Regards,
          BB

          Comment


          • #6
            BB

            However, one issue remains that how do I get these values for all the 26 bars in a day (assuming I am working on a 15minute chart) without changing the script each time but calling them in excel with 0, -1, -2; where 0 = current bar and -1 for previous bar and hence forth.
            It depends on what you want to accomplish.
            f you just need one value at a time then you will need to modify that script to retrieve the specific value eg. tt4.getValue(0) will retrieve the value of the current bar, tt4.getValue(-1) that of the previous bar etc that is being assigned to the DDE link [note that you would not be able to call the specific values from Excel]
            If instead you need all the values concurrently then you will need to create within the efs a separate DDE object for each value that you want to link to Excel. If you search the forums you should find some examples on how to do this as I believe it has been covered before

            Since, I would be interested in doing this output to Excel for Volume, EMA, MACD and RSI, your confirmation if the same ATR EFS will work (by replacing the study name in place of ATR) for most of my requirement would be helpful.
            Replacing the function name alone will not always work as different functions may require different sets of parameters. You will need to check the EFS KnowledgeBase for the syntax required by each function
            Alex


            Originally posted by BB
            Thanks Alex,

            Yes, it did work. Many thanks.

            However, one issue remains that how do I get these values for all the 26 bars in a day (assuming I am working on a 15minute chart) without changing the script each time but calling them in excel with 0, -1, -2; where 0 = current bar and -1 for previous bar and hence forth.

            Since, I would be interested in doing this output to Excel for Volume, EMA, MACD and RSI, your confirmation if the same ATR EFS will work (by replacing the study name in place of ATR) for most of my requirement would be helpful.

            Many thanks for your kind help.

            Regards,
            BB

            Comment

            Working...
            X