Announcement

Collapse
No announcement yet.

Realtime Swings.efs

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

  • #31
    Hello,
    RealTimeSwing.efs does not function with me?

    Error in line 48
    ReferenceError: set ShowTitleParameters is not defined

    Is a Wizard Alert also possible?

    Best Regards

    Comment


    • #32
      Rodondo
      That is very likely because the version of eSignal that you are running is an older release that does not include that function. You may want to consider upgrading to a more recent version.
      Alternatively open the efs with the Editor and comment out line 48. To comment out a line type // at the beginning of the line. What that function does is prevent the parameters from showing in the chart.
      Alex

      Comment


      • #33
        RealTimeSwings2.efs Questions

        RealTimeSwings2.efs Questions

        How can I export the pivot values? The don't show up when I preform Data Export.

        If I increase the "Number of Historical Labels" to 1000 the pivot values show up on my chart but the line going from each pivot value does not go back as far. Is there a way to fix the problem?

        Comment


        • #34
          Grue

          Modify the efs with the following line...

          var pts = (y1b-y1a).toFixed(2);

          if(sType == "con")debugPrintln(pts);


          around line 370 or so, seems to output the swing highs/lows.

          Comment


          • #35
            I have made some minor modifications to RealTimeSswings.efs to change the screen look. I am having difficulty with one modification and would appreciate your help.

            The issue pertains to the first parameter in drawTextRelative.

            Please refer to lines 370-371, and lines 372-373.

            I am trying to place text on the screen in the relative location of the bar where the pivot occurs, and the text gives the bar index of that pivot.

            When 370-1 are in the script, it returns an error in the first parameter.

            As a test, I tried using lines 372-3, using a static x-coordinate. This code runs and the value of aSwingsIndex[2] displays on the screen. So that value is available to display as text, but not available as an x-coordinate.

            Why is that, and how can I rectify the problem? How can I capture the value of that prior pivot and use it as an x-coordinate?

            I have tried assigning the value to a new variable on line 359 (similar to line 358) but the results are still the same . . . it displays as text but not as a cooridinate.

            Thanks very much. Joe.
            Attached Files

            Comment


            • #36
              Hi jcprincter,

              Thank you for posting your code, then also specifying the line numbers, this makes it much easier to troubleshoot.

              Your problem is that the variable you are sticking in there has not had a value defined for that variable. Try putting this line in above that one and look at the formula output window.

              debugPrintln("369: aSwingsIndex.length = "+aSwingsIndex.length+" type = "+typeof(aSwingsIndex[2])+" aSwingsIndex = "+aSwingsIndex);


              you will see the following output.
              369: aSwingsIndex.length = 4 type = undefined aSwingsIndex = -4,,,
              Downloads\realtimeswings-jcp.efs, line 371: Parameter Number 1 of Function drawTextRelative is invalid


              the problem is that aSwingsIndex[2] is undefined at this early stage of operation of the efs.

              Are you using the correct variable for what you want?

              Comment


              • #37
                Hello,
                Can an option be added to the RealTimeSwings2 efs to base the swing on the number bars making Higher Highs and Lower Lows?

                For example, if it was set for two HH/LL's the swing would be egnored if we only had one HH/LL's. The swing would continue until two HH/LL's occured.

                Thanks,
                Russ
                Attached Files

                Comment


                • #38
                  Yes, it can be done but the programming required may be relatively complex. If you are unable to do this yourself you may want to post your request in the New Study Suggestions Forum and see if someone is willing to do it for you. Alternately, contact an EFS Consultant and have them program the study for you.

                  Comment


                  • #39
                    Can an option be added to the RealTimeSwings.efs to base the swings on a, user defined, fixed minimum range/points?

                    Comment


                    • #40
                      Hi Kevin,

                      I believe it can be done. Presently, it is set up to use percentages, so what you need to do is go through the efs and identify the location of these variables.

                      Do not let the advanced nature and complexity of the efs intimidate you. Simply identify where the percentage variables associated with the variable that was used for this purpose.

                      Based on what I have seen, you are capable and should be able to do this with only a minimal amount of work. Copy, then comment out each line (such that you can see as you are editing how the previous calculation was performed as you are modifying the code).

                      Then go through the efs one line at a time renaming the percentage variables and modify the associated calculations to use a constant. (I usually print out the efs to do this). If you approach it like this, you should get it working this weekend.

                      If you run into problems, try and work through them, if you still are having problems next week, perhaps someone can help later next week or sometime thereafter.

                      Comment


                      • #41
                        Thanks. I'll give it a try.

                        Comment


                        • #42
                          I need some help with this one I tried tweeking some of the % parameters to make a fixed/constant range to no avail. Any help with this would be appreciated.

                          Attached is the real time swing efs:
                          Attached Files

                          Comment


                          • #43
                            I took another crack at it and made some progress by changing the following:

                            From:

                            Code:
                            function confirmSwings() {
                                if (x1b != x2b) {   // underdeveloped dev1 line
                                    if (sWaveTypeG == "% Retracement") {
                                        var nWave = (Math.abs(y2a-y2b) / Math.abs(y1b-y1a));
                                    } else {
                                        var nWave = (Math.abs(y2a-y2b) / y1b);
                                    }
                                    if (vLastSwing == "L" && nWave >= nRetpcnt ) {
                                        // Swing High
                                        nScntr = 0;
                                        vLastSwing = "H";
                                        doLine("con");
                                    } else if (vLastSwing == "H" && nWave >= nRetpcnt ) {
                                        // Swing Low
                                        nScntr = 0;
                                        vLastSwing = "L";
                                        doLine("con");
                            To:
                            Code:
                             function confirmSwings() {
                                if (x1b != x2b) {   // underdeveloped dev1 line
                                    if (sWaveTypeG == "% Retracement") {
                                        var nWave = [B](Math.abs(y2a-y2b));[/B]
                                    } else {
                                        var nWave = [B](Math.abs(y2a-y2b));[/B]
                                    }
                                    if (vLastSwing == "L" && nWave >= [B]2[/B] ) {
                                        // Swing High
                                        nScntr = 0;
                                        vLastSwing = "H";
                                        doLine("con");
                                    } else if (vLastSwing == "H" && nWave >= [B]2[/B] ) {
                                        // Swing Low
                                        nScntr = 0;
                                        vLastSwing = "L";
                                        doLine("con");

                            Comment


                            • #44
                              This seems to work for the most part; however, I noticed some swings are missing after an extreme wide range bar with a long wick. I tried reducing the number of bars to 1 to no effect.

                              Comment


                              • #45
                                Hi Kevin,

                                It looks to me as if you figured it out, congratulations.

                                Perhaps the reason it looks odd is that the number you chose was significantly different than the percentage values used.

                                I suggest that you place some debugPrintln statements in the original that output the values of Math.abs(y2a-y2b) are when the subsequent vLastSwing conditionals are satisfied.

                                Compare them with the numbers you used, any differences in these values are likely responsible for the different than expected behavior.


                                Originally posted by kevinmclark
                                This seems to work for the most part; however, I noticed some swings are missing after an extreme wide range bar with a long wick. I tried reducing the number of bars to 1 to no effect.

                                Comment

                                Working...
                                X