I want to return a value (variable) undefined before and after a given date

Forums ProRealTime English forum ProBuilder support I want to return a value (variable) undefined before and after a given date

Viewing 8 posts - 1 through 8 (of 8 total)
  • #208002

    Hey there…

    Here’s a challenge for you:-) Or maybe there is a simple solution to this?

    I want to return a value (variable) which is undefined before and after a given date that i set my self. Basically, I want to set the start date of when the variable should start returning values and I want to set the end date of when the same variable should stop returning values.

    How can this be coded? Probably quite simple huu?

    Let me know

    #208048

    You can use UNDEFINED just for the first time, any subsequent assignement cannot be overwritten. So the solution is to reset the variable to 0, not to UNDEFINED:

     

    #208068

    Thanks for your answer! That means that UNDEFINED is probably not the right way to achieve what I want to achieve. Maybe it’s not possible at all.

    I want to return a value from an indicator that I coded my self, but I don’t want any value to be returned before and after the STARTTIME and ENDTIME.

    If I return a “zero” the visualization in the chart get messed up and it returns the wrong values for other parameters.

    Maybe it’s not possible? What’s your thoughts?

    Thanks Patrik

    #208083

    This always plots the same variable, but makes it invisible outside the selected time interval:

    #208085

    Wow… OK! 🙂

    But T can be dynamic right?

    /Pat

    #208095

    What do you mean by “DYNAMIC” ?

    #208104

    …well, basically “t” will be the result of a changing parameter calculation/indicator in my code. In your example it’s set to t=255, but I guess that “t” can represent any given result/value from another calculation/indicator.

    Right?

    /Pat

    #208149

    t is just the Alpha, or Transparency, attribute to be used with colours to make them fully visible or not, it can range from 0 to 255, 255=fully visible and 0=invisible  (an example about COLOURED at https://www.prorealcode.com/documentation/drawarrow/.

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

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