Announcement

Collapse
No announcement yet.

EFS RSI Help

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

  • EFS RSI Help

    Hello!
    Prompt please:
    It is necessary RSI (3) from close today - close yesterday.
    As I understand here it is necessary to write something. (A picture has attached)
    In advance thanks!
    Attached Files

  • #2
    slavasvk
    close-close1 is not a valid syntax in the first place as it should be close(0)-close(-1)
    Irrespective that expression does not return a series which is required by the rsi() function (see this article in the EFS KnowledgeBase for the description of the function and required syntax).
    In order to be able to use that expression as the source of the rsi() function you need to calculate it in a separate function and then call that function from main() using the efsInternal() function (see this article in the EFS KnowledgeBase for the description of the function and the required syntax). That will create the series which you can then use as the source for the rsi() function.
    For an example of how to accomplish this see this thread which shows step by step how to create a custom variable and then use that as the source of a built-in function.
    Give this a try and if you encounter any problems post your code as you have written (or modified it) and someone will be available to help.
    Alex

    Comment


    • #3
      EFS RSI Help

      Many thanks for your detailed answer!
      I write to you from Russia. Unfortunately I cannot write such program as not so well I understand English language.
      On it I will try will address for the help to you - to visitors of a forum.

      It is usual RSI, only at calculation instead of the closing price the difference the closing price today - the closing price yesterday undertakes.

      This method is described in book Linda Raschke.
      In Tradestation becomes simply, approximately as it is shown on a picture more low.

      Thanks!
      Last edited by slavasvk; 10-01-2007, 10:45 PM.

      Comment


      • #4
        slavasvk
        In your specific case there is also a simpler alternative which does not require creating a separate function.
        In your expression you are calculating the difference between the current Close and that of the prior bar. This is the same as calculating a 1 period Momentum for which there is already a built-in function that returns a series.
        So in its most basic form the study can be calculated in the following way
        PHP Code:
        function main(){
            return 
        rsi(3mom(1));

        The above will calculate a 3 period RSI of the difference between the current (ie today's) Close and the Close of the prior bar (ie yesterday's)
        Copy the contents of the PHP box into the Formula Editor window and save the script with a name of your choice then load the efs in the chart. The following image shows the resulting plot.



        If you are unfamiliar with programming in EFS (Esignal Formula Script) and are interested in learning then I would suggest you start by reviewing the JavaScript for EFS video series and the Core JavaScript Reference Guide. Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
        As you are learning I would also suggest you search the forums as many studies have already been programmed in efs and are freely available.
        If at any point and time you have a specific programming question or problem with your code post it in this forum and someone will be available to help.
        For your information the eSignalCentral Bulletin Board also has a Russian Forum which is followed by russian speaking moderators.
        Alex

        PS. When replying to a thread please use the POST REPLY or QUOTE buttons rather than the NEW THREAD button.

        Comment


        • #5
          Thank you very much!

          Thank you very much!

          Comment


          • #6
            slavasvk
            You are most welcome
            Alex

            Comment

            Working...
            X