New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Syntax Error

Something is wrong with this syntax. Help
and [yesterday's close >= (yesterday's lower BB(20,2)) - (0.05*yesterday's close BB Width(20,2))]


  • Options
    markdmarkd mod
    edited June 2022
    0.05 * yesterday's close BB Width(20,2)

    You can't say "close BB Width(20,2)" ; it has to be either "close", or "BB Width(20,2)".

    Also, use brackets[ ] , not parens ( ) for grouping expressions. Parens are reserved for functions [like sma( ), BB Width, etc.]

    I'm guessing you want the close to be near the lower BB within a fraction (.05) of the BB Width. If so, this passes syntax:

    and [yesterday's close >= yesterday's lower BB(20,2) - [yesterday's BB Width(20,2) * .05]]

    I didn't run it to test the logic, just checked the syntax.
  • Options
    Thanks Mark
Sign In or Register to comment.