Announcement

Collapse
No announcement yet.

Help With Highest High

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

  • Help With Highest High

    Hello All,

    Can someone please help with tweak the attached code to alert me (just once) each time the highest high as been attained. At the moment it appears to alert me when the highest high is being approached (and that doesn't seem to work properly). I believe it was originally written buy JayF.

    Anyway, any assistance will be greatly appreciated.

    Thank you.

    Carlton
    Attached Files

  • #2
    Carlton
    Modify Lines 16 and 21 respectively to

    if (high() >= nearhigh && high(-1) < nearhigh){

    if (low() <= nearlow && low(-1) > nearlow){

    Alex

    Comment


    • #3
      Hi Alex,

      Thanks for helping me out. I made the changes you suggested, however, it doesn't appear to work at all now. I have attached an image showing where this formula should have alerted me (see the circles).

      Cheers

      Carlton
      Attached Files

      Comment


      • #4
        Carlton
        As far as I understand it the efs uses callFunction() to get the High and Low of the day from getTodayOHLC1.efs which would imply that at this time the efs will trigger an alert only on the bar that reaches the high of the day as per the Daily snapshot.
        Anyhow I ran the efs in Bar Replay and it seems to trigger an alert on the appropriate bar (see image below)
        Alex

        Comment


        • #5
          Carlton
          In looking at the image you posted if should alert you only on the first bar of the group that reaches the high of the day ie. the ones in the last circle on the chart.
          In real time though the efs would have triggered an alert on the other circled highs assuming those were breaching the high of the day.
          Hope this helps
          Alex

          Comment


          • #6
            Alex,

            I understand what you mean when you say "

            efs uses callFunction() to get the High and Low of the day from getTodayOHLC1.efs which would imply that at this time the efs will trigger an alert only on the bar that reaches the high of the day as per the Daily snapshot".

            I have changed some of the code in the gettodayOHLC1.efs to get the high and Low of the day over a 5min interval (as shown in attached efs).

            In reading your last post, I'm not sure what you mean when you say it "should alert me only on the first bar of the group". I can't see how the code selects the group. In anycase I was hoping that the code would alert me at each new Highest High.

            I'm somewhat confused

            Carlton
            Attached Files

            Comment


            • #7
              Carlton
              Run the efs on the chart you posted and go in Bar Replay mode (right click chart->Tools->Bar Replay). Set the Bar Replay to a few bars before the last circled group of bars and then step forward one bar at a time.
              Once you get to the bar that equals the high of the day as per the Daily snapshot the efs should trigger the alert (it did at my end). It should do so only on the first bar because the efs will reset only if the high of the bar is lower than the high of day which does not happen in that group (all three bars match the high of the day)
              Alex

              Comment


              • #8
                Alex,

                I see what you mean when you say with all the "three bars" bunched together match the high of the day, however, should I have not been alerted when - prior to the the three bar bunched together, there were higher highs during the course of the day?

                Carlton

                Comment


                • #9
                  Alex,

                  As further explanation, should I not have been alerted at point 2 and 3 on the attached image as well as 4?

                  Carlton
                  Attached Files

                  Comment


                  • #10
                    Carlton
                    Yes you would have been alerted had you been running the efs at that time in real time. However at this point the high of the day as per the Daily Snapshot is set to 93.00 so those bars do not breach the high of the day any more (even if you go in Bar Replay).
                    As an experiment calculate what price difference there is between the high of the day (ie 93.00) and any one of those highs (for example #2). Then modify Line 16 of the efs to

                    if (high() >= nearhigh-difference && high(-1) < nearhigh-difference){

                    where difference is the value mentioned above and run through Bar Replay setting it to a few bars before the high #2 and you will see that it will trigger the alert once the bar that sets high #2 is reached
                    Alex

                    Comment


                    • #11
                      Carlton
                      Perhaps the attached efs will better illustrate what the efs "sees" as it will plot a line at the high of the day.
                      Load it in the chart and then using Bar Replay go back in time to any bar before the ones that set the high of the day. At this point you should see that the red line remains at that high and it does not come down to match the high of the bar you are on now even if at that time that was the high of the day.
                      Hope this helps
                      Alex
                      Attached Files

                      Comment


                      • #12
                        Alex,

                        Just did it. However, I'm afraid I'm still a little confused. Your attachment perfectly alerts me at the high of the day, but there were higher highs before that time. I just don't understand why its not alerting me at the highest highs before.

                        Just so you know I did run bar replay just before the those highs.

                        Am I just being dumb? I truly feel I'm making sense.

                        Carlton

                        Comment


                        • #13
                          Carlton
                          The efs you posted will only alert you when the high of a bar equals or breaches the high of the day as it is currently shown in the Daily Snapshot. If that is set to 93.00 then the efs will not alert you to any high before that even if at that time it was the high of the day.
                          When you say "higher highs" what exactly do you mean?
                          Higher highs of the day, of 5 minutes ago, of the last twenty bars, other? Each one has different implications. As of now the efs ONLY looks at the high of the day and it will alert you ONLY on the first bar whose high will be equal or higher than that.
                          Alex

                          Comment


                          • #14
                            Alex,

                            I guess I mean higher highs of the day within 5mins. I modified getTodayOHLC1.efs to reflect 5mins ( I think ) as shown in the attachment, getTodayohlc2.efs

                            Let me ask you a question, wasn't the high breached at point 2 on the image I posted?

                            Carlton
                            Attached Files

                            Comment


                            • #15
                              Carlton

                              Let me ask you a question, wasn't the high breached at point 2 on the image I posted?

                              It was then but it is not now as far as the efs is concerned. Run the efs that I posted that plots the band and go back to that high #2 using Bar Replay.
                              Where is the red line? I would imagine still at 93.00 hence as far as the efs is concerned that high #2 does not equal or breach the high of the day at this moment. Again, it would have alerted you if you had been running the efs at that time.
                              Alex

                              Comment

                              Working...
                              X