Announcement

Collapse
No announcement yet.

Help with a study

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

  • Help with a study

    hello:

    I am looking for help with an efs that would alert me when the most recent bar-when volume divided into the range of the bar and compared with the previous two price bars, with the mathematical result being lower, will produce an alert like a circle above the price bar.

    current bar (range:hi-lo)/volume < previous (range:hi-lo)/volume &

    current bar (range:hi-lo)/volume < 2 periods ago previous (range:hi-lo)/ volume

    thanks


    __________________
    FURIO
    FURIO

  • #2
    FURIO
    Run a search for squat and you will find an efs that does what you are looking for
    Alex

    Comment


    • #3
      KST Formula

      Dear All

      I have KST formaulas for Metastock, and wish to convert into eSignal and add various moving averages, I see in technical support their is a verison of the KST but when opened seems incorrect.

      Does anyone have or use these indicators

      Regards
      Craig

      Comment


      • #4
        cwhitelaw,

        You may want to check out the following KST Formula by TSSupport. I think this is what you are looking for.

        Comment


        • #5
          KST

          Thanks DuaneG

          However the formula seems incorrect, compared to metastock, seems to have a big delay or lag!

          Comment


          • #6
            this is the script that I am now using..is this formula correct?

            //{{EFSWizard_Description
            //
            // This formula was generated by the Alert Wizard
            //
            //}}EFSWizard_Description 7532


            //{{EFSWizard_Declarations

            var vLastAlert = -1;

            //}}EFSWizard_Declarations 2482


            function preMain() {
            /**
            * This function is called only once, before any of the bars are loaded.
            * Place any study or EFS configuration commands here.
            */
            //{{EFSWizard_PreMain
            setPriceStudy(true);
            setStudyTitle("");
            //}}EFSWizard_PreMain 5650

            }

            function main() {
            /**
            * The main() function is called once per bar on all previous bars, once per
            * each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
            * in your preMain(), it is also called on every tick.
            */

            //{{EFSWizard_Expressions
            //{{EFSWizard_Expression_1
            if (
            ((high(-2)-low(-2))/volume(-2)) > ((high(-1)-low(-1))/volume(-1)) & ((high(-3)-low(-3))/volume(-3)) > ((high(-1)-low(-1))/volume(-1))

            ) onAction1();
            //}}EFSWizard_Expression_1 10001

            //}}EFSWizard_Expressions 23340


            //{{EFSWizard_Return
            return null;
            //}}EFSWizard_Return 2256

            }

            function postMain() {
            /**
            * The postMain() function is called only once, when the EFS is no longer used for
            * the current symbol (ie, symbol change, chart closing, or application shutdown).
            */
            }

            //{{EFSWizard_Actions
            //{{EFSWizard_Action_1
            function onAction1() {
            drawShapeRelative(-1, high(), Shape.DIAMOND, "", Color.RGB(155,0,0), Shape.LEFT);
            vLastAlert = 1;
            }
            //}}EFSWizard_Action_1 16427

            //}}EFSWizard_Actions 26469
            FURIO

            Comment


            • #7
              FURIO
              The attached revision of your efs shows how you would set up the conditions. Open it with the Formula Wizard to view the changes
              Alex
              Attached Files

              Comment


              • #8
                Thanks alex...

                This is great..cant wait to test it 2morrow in the market.
                FURIO

                Comment


                • #9
                  FURIO
                  You are most welcome.
                  FWIW you don't need to wait until tomorrow to try the efs out. You can run the efs using the Tick Download/Replay function
                  Alex

                  Comment


                  • #10
                    Updated squat bar

                    Alex:

                    I was comparing the two formulas. What is the difference between the 2?

                    The only difference I see is that there are 2 && in the new formula.

                    Thanks
                    FURIO

                    Comment


                    • #11
                      FURIO
                      That is one difference. The other is that the shape is drawn at the value of high(-1) rather than high().
                      More importantly though if you open the efs with the Formula Wizard you will see that the conditions are laid out differently in Set1
                      Alex

                      Comment


                      • #12
                        MOV ROC MA

                        Alex:

                        I have tried to no avail to insert a zero line in this indicator Mov Roc Ma), as well as paint the bars blue when above zero and red when below. I have posted the formula below and would appreciate any help. Thanks for all your great help!

                        /************************************************** *****************
                        Provided By : TS Support, LLC for eSignal. (c) Copyright 2002
                        ************************************************** ******************/

                        var roc6 = new ROCStudy(6, "Close");
                        var roc10 = new ROCStudy(10, "Close");
                        var roc15 = new ROCStudy(15, "Close");
                        var roc20 = new ROCStudy(20, "Close");

                        function preMain()
                        {
                        setStudyTitle("MOV ROC MA");
                        setCursorLabelName("MOV ROC MA", 0);
                        setDefaultBarFgColor(Color.blue, 0);

                        }


                        function main() {

                        var i;
                        var vROC6 = roc6.getValue(ROCStudy.ROC,0,10);
                        var vROC10 = roc10.getValue(ROCStudy.ROC,0,10);
                        var vROC15 = roc15.getValue(ROCStudy.ROC,0,8);
                        var vROC20 = roc20.getValue(ROCStudy.ROC,0,15);
                        var Sum6 = 0, Sum10 = 0, Sum15 = 0, Sum20 = 0;
                        if(vROC6 == null || vROC10 == null || vROC15 == null || vROC20 == null)
                        return;
                        for(i = 0; i < 15; i++){
                        if(i < 10)
                        Sum6 += vROC6[i];
                        if(i < 10)
                        Sum10 += vROC10[i];
                        if(i < 8)
                        Sum15 += vROC15[i];
                        Sum20 += vROC20[i];
                        }


                        return (Sum6 / 10 + (Sum10 / 10) * 2 + (Sum15 / 8) * 3 + (Sum20 / 15) * 4);

                        }

                        Comment


                        • #13
                          Insert the following line in the premain;

                          addBand(0, PS_SOLID, 1, Color.blue);

                          Comment


                          • #14
                            Thanks

                            Thanks Drizzi - works great. Do you have any idea how to overcome the 14 period lag on this indicator...?

                            Comment


                            • #15
                              ROC

                              Not sure what you by "overcome". The calculation is recursive which is why the indicator plots so smooth. Look at the attached EFS to see how the standard ROC plots. If you want to reduce the lag you need to use lower periods than 6,10,15 and 20. Try lowering them to 4,6,10, and 14 and see if that works any better for you. Just make sure you change them uniformly throughout the code.

                              RGDS
                              Doug
                              Attached Files

                              Comment

                              Working...
                              X