Announcement

Collapse
No announcement yet.

JMA crossover Study with Problems

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

  • JMA crossover Study with Problems

    The attached EFS is a JMA Crossover with screen BG color changes and arrows drawn at the point of cross..

    BG color changes work great, but there is an issue with the the arrows and popup/audio alerts, which are edited out..

    The EFS does have notes written in it telling you of the intent of this study..

    Open it in editor to read..

    Attached Files

  • #2
    the attached chart..IT WORKED..shows the problem with
    the arrows..



    TIA to all the Help..

    Racer

    Comment


    • #3
      Racer
      I can't run the efs as I do not have the Jurik studies but here is what I see in your code regarding possible issues with the arrows drawn in real time

      In lines 119-121 you have the following
      drawShapeRelative(0,low(-5),Shape.UPARROW,"",Color.green,null,"Up"+ BarCount);
      }else{
      removeText("Up"+BarCount);

      The issue here is that when running in real time as the averages cross/uncross intrabar you will have some arrows that will be left on the chart even when the averages end up not being crossed. This is because you are using drawShapeRelative() to draw the arrows but then use removeText() rather than removeShape() to delete them so the arrows never actually get removed.

      The same issue happens in lines 125-127 where removeText() is used in place of removeShape()
      drawShapeRelative(0,high(5),Shape.DOWNARROW,"",Col or.red,null,"Dn"+ BarCount);
      }else{
      removeText("Dn"+BarCount);

      A further issue in this case is that the arrows will not even draw in real time as their y-axis coordinate is the high of 5 bars into the future which does not exist at the time of the event.

      As to the section of the code that is commented out you could enclose it all in an if(getBarState()==BARSTATE_NEWBAR) statement so that it will only trigger the alert list at the completion of the bar once a cross is confirmed. This way you don't need to use setComputeOnClose() which would instead impact the whole script
      Hope this helps
      Alex

      Comment


      • #4
        Alexis..Again Thank You..

        That fixed the problem with the shapes, but the audio and popup, well that is a totally different story..

        I did try the "(getBarState() == BARSTATE_NEWBAR)" to no avail and then actually even tried "(getBarState() == BARSTATE_CURRENTBAR)" which still appears in the revamped EFS..

        I put "setComputeOnClose" before the routine thinking that may fix the problem but it made the complete EFS "ComputeOnClose"..THis actually solved the problem of firing on every tick and many may like it like that..All one has to do is unedit it back in..

        From here I can continue with my Strategy..My only wish is that the popup and audio would work like intended, maybe something that eSignal can work on for everyone here.

        Enclosed is the updated EFS for all to enjoy and use..Hopefully someone can update it or even create something new based off of it to better use the Jurik Toolset..

        Racer.
        Attached Files

        Comment


        • #5
          Racer
          Try the attached revision of the efs which was modified along the lines I suggested in this thread.
          Alex
          Attached Files

          Comment


          • #6
            Alex!!!!!!!

            PERFECTION!!!

            This efs now sounds an alert together with the popup alert..Everyone enjoy and use it..More coming from me now that I see how to make things work..

            Alexis, I can't thank you enough..I was working on putting the code you posted in the other forum to this and had to leave for a bit..I will study it and learn from it..

            Thanks many times over..

            Racer

            Comment

            Working...
            X