Doji crosses

What’s wrong with this? errors
and [[Dragonfly Doji X sma(20 , close)] or [(close/open-1 >=.005) X sma(20,close)]]

Comments

  • markd
    markd mod
    edited December 2023
    and [[Dragonfly Doji X sma(20 , close)] or [(close/open-1 >=.005) X sma(20,close)]]


    try this for the first part:


    and [

    [
    [Dragonfly Doji is TRUE]

    and [close x sma(20,close)]
    ]

    Dragonfly Doji is true/false, while sma is numerical; you can't (edited from "can") compare true/false to a number.


    for the second part

    or [(close/open-1 >=.005) X sma(20,close)]]

    the left hand side is not valid because it's a complete expression, not a recognized variable;

    instead, maybe

    or

    [

    [close/open-1 >=.005]

    and [close x sma(20,close)]

    ] ]

    Also, you might need to clarify the close/open operation; and use brackets, not parens, which are reserved for built-in functions, like sma( ).

    is it

    [[close/open] - 1] >= .005]

    (i.e. divide the close by the open, then subtract 1 from the result)

    or is it

    [close/[open - 1] >= .005] ?

    (i.e. subtract 1 from the open and divide the result into the close)

    I know there is an order of precedence for operations, but I can never remember what it is, so the brackets help make it clear what you are asking for.
  • Thanks MARKD...Ill will try your recomendation