Announcement

Collapse
No announcement yet.

Trying to put alarm on RSI

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

  • Trying to put alarm on RSI

    I modified the build in RSI to include an alarm but it rings all the time could somebody look at it and tell me what is wrong
    Attached Files

  • #2
    richbois
    There are several errors in the script
    1. When you have a condition that needs to execute more than one command these need to be enclosed in brackets { } as in the following example
    if(mycondition==true){
    execute this command;
    execute this command;
    etc;
    }

    2. vFlag needs to be declared as a global variable (ie outside of main) and set initially to false
    3. In your condition you need to add a check for vFlag == false otherwise the alerts will keep triggering so long as the condition is true.
    4. The condition is written incorrectly as it should be == and not just =
    5. You will probably need to review the condition that triggers the alert as I doubt there will be many instances in which the RSI will be exactly equal to the Breakout value
    Alex

    Comment


    • #3
      Originally posted by Alexis C. Montenegro
      richbois
      There are several errors in the script
      1. When you have a condition that needs to execute more than one command these need to be enclosed in brackets { } as in the following example
      if(mycondition==true){
      execute this command;
      execute this command;
      etc;
      }

      2. vFlag needs to be declared as a global variable (ie outside of main) and set initially to false
      3. In your condition you need to add a check for vFlag == false otherwise the alerts will keep triggering so long as the condition is true.
      4. The condition is written incorrectly as it should be == and not just =
      5. You will probably need to review the condition that triggers the alert as I doubt there will be many instances in which the RSI will be exactly equal to the Breakout value
      Alex

      ok thanks I modified it to incorporate your suggestions and its working except that once alarm triggered it never stops untin RSI gets below or above the set values

      could you look at it again please
      Attached Files

      Comment


      • #4
        thanks

        thank you I just figured it out

        needed { after the 1st if condition

        Comment

        Working...
        X