Announcement

Collapse
No announcement yet.

Multiple If/Else statements; Format; Return multiple studies

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

  • Multiple If/Else statements; Format; Return multiple studies

    For a formula returning multiple studies, with each study having its own if/else statement, how are the if/else statements written and separated so each if/else statement is independently recognized and executed? The objective is to have each study returned per its own if/else statement, but what I've got is an incorrectly written if/else statement format, with the first "If" statement in function main() recognized, but nothing after that.

    Attached is a simple formula to display an array of moving average lines, each turning color per bar(0) +/- relative to bar(-1). Can anyone identify what the problems are? There's no syntax errors, but the MA lines do not change color, and even the first if/else statement doesn't work.

    (Searched the bulletin board and tried the EFS Help Center but couldn't locate anything useful on If/Else statements.)

    Thanks in advance.
    Attached Files

  • #2
    Lancer
    The attached efs produces the following results.
    Alex

    Attached Files
    Last edited by ACM; 05-10-2003, 12:29 PM.

    Comment


    • #3
      Ahhh, I see. With multiple conditional statements, the study is identified by number (0,1,2,3, etc.) relative to its position in the var stack, and not by study var name. The numeric identifier is placed both at the end of the if statement and at the end of the else statement.

      Thank you Alexis.

      Comment

      Working...
      X