Announcement

Collapse
No announcement yet.

overlay for energy

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

  • overlay for energy

    Hi guys...

    Is it possible to overlay moving average of another symbol onto your current chart

    -Rupe
    Last edited by rupe; 06-23-2005, 01:45 PM.

  • #2
    Rupe
    Yes it is possible and the studies in the EFS2 Custom folder are already enabled to do that.
    In the image enclosed below you can see the moving average of IBM plotted on a Dow Industrials chart.
    Alex

    Comment


    • #3
      thanks

      Hi Alex,

      Thank you very much. I didn't realize its part of efs2 basics.... thank You....

      Comment


      • #4
        Rupe
        EFS2 allows you to apply any study (builtin or custom) to an external symbol and/or interval. For example in the chart below you can see that the main symbol is $INDU while the overlayed symbol is Crude with a Donchian Channel based on that symbol
        Alex

        Comment


        • #5
          apply external symbol

          hi,

          Can you tell me how to apply external symbol to the following formula but i think it might have been written in older code since it was written by alex few years ago.

          -rupe
          Attached Files

          Comment


          • #6
            rupe
            You can use the MAx2.efs that is available here
            Comment out the setPriceStudy)true) statement in preMain and change the return from return new Array(getSeries(xMA1), getSeries(xMA2)); to return (getSeries(xMA1) - getSeries(xMA2));
            Alex

            Comment


            • #7
              works fine

              Hi alex...

              i made the changes you suggested and it seems to work just fine...i was wondering how/where would i be able to add an alert

              -rupe

              Comment


              • #8
                rupe
                You will need to first create the variables required by the conditions that generate the alerts. For example:

                var vDiff = xMA1.getValue(0) - xMA2.getValue(0);
                var vDiff_1 = xMA1.getValue(-1) - xMA2.getValue(-1);
                var vDiff_2 = xMA1.getValue(-2) - xMA2.getValue(-2);
                etc as necessary


                Then you would use those variables in your conditions such as for example

                if(vDiff > vDiff_1 && vDiff_1 < vDiff_2){
                Alert.playSound("ding.wav");
                }


                Search through the forums and you will find many examples of EFSs that generate alerts based on all types of studies, builtin or otherwise. While the syntax will be slightly different the logic will be the same.
                Alex

                Comment


                • #9
                  thanks alex....i will work on that ...

                  Comment

                  Working...
                  X