Usage of the UNDEFINED keyword

Forums ProRealTime English forum ProBuilder support Usage of the UNDEFINED keyword

Viewing 2 posts - 1 through 2 (of 2 total)
  • #20215

    Hello everyone,

    I have programmed custom indicators for years, but I’m unable to use the UNDEFINED keyword.

    In order to learn how to use in its simplest form, I’ve created the following indicator

    I would have expected the custom indicator to have returned One (1) if there is an increase in the closing price, or Zero (or unknown or error, but different from zero in any case) in any other case.

    My indicator always returns One(1)

    There must be something that I am missing. Could you please help me understand?

    Thank you in advance

    Vicente

    #20217

    The “undefined” keyword can only be used one time in a prorealtime code. It’s mainly use to set a variable to “nothing” before giving it a value for the first time, but then you cannot revert the variable to nothing (undefined).

    So, the best you can do is set your variable to 0 if you don’t want to see it on your chart or your oscillator.

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login