Announcement

Collapse
No announcement yet.

How to turn off alert after it alerts you

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

  • How to turn off alert after it alerts you

    How do you make efs code alert you just one time. I am using a script out of esignal file share MA-XOVER-ALERT.efs.. When price break the moving average alerts keep poppoing up. I only went it to pop up alert just one time per day then shut off.
    Attached is the code. Thank you very much
    Attached Files

  • #2
    Re: How to turn off alert after it alerts you

    sjsr
    To make the alert sound only once per day increase nBarCounter only when the day changes rather than at every new bar. To do this add && day(0)!=day(-1) to the if(getBarState()==BARSTATE_NEWBAR) conditional statement that executes the counter
    Alex


    Originally posted by sjsr
    How do you make efs code alert you just one time. I am using a script out of esignal file share MA-XOVER-ALERT.efs.. When price break the moving average alerts keep poppoing up. I only went it to pop up alert just one time per day then shut off.
    Attached is the code. Thank you very much

    Comment


    • #3
      It works but lost line

      I added && day(0)!=day(-1). So now it looks like:
      if ( getBarState() == BARSTATE_NEWBAR && day(0)!=day(-1) ) {

      nBarCounter++;

      }

      In doing this there is no longer moving average line indicator on charts. It is gone.
      I

      Comment


      • #4
        Re: It works but lost line

        sjsr
        Replace the ( nBarCounter > Period ) condition that is before the return statement with ( nMA != null ) and it will work
        Alex


        Originally posted by sjsr
        I added && day(0)!=day(-1). So now it looks like:
        if ( getBarState() == BARSTATE_NEWBAR && day(0)!=day(-1) ) {

        nBarCounter++;

        }

        In doing this there is no longer moving average line indicator on charts. It is gone.
        I

        Comment


        • #5
          Time setting instead of day setting.

          Hello,
          Is it possible to set it in time instead of day, i tried above setting it working ok and giving alert once a day, as exchange closes at 16:00 and start again at 17:00 i mean give 1 signal between 17:00-16:00(consider as 1 day) and again start at 17:00 and again give another signal, instead of day/date setting. As exchange runs almost 23 hours a day.
          Thanks for the help.
          Adnan William
          Last edited by adnanwilliam; 09-14-2012, 02:02 PM.

          Comment

          Working...
          X