Time based info

Viewing 5 posts - 1 through 5 (of 5 total)
  • #69337

    Hi

    I am trying to update my indicator value only at a specific time of the day and then have that value carried until the next update same time next day – I have read the user manual but can’t workout why the below updates every bar instead of the time of 10am

    —-

     

    ——-

    Any thoughts on where I am going wrong?

     

    Thanks

    #69338

    To write code, please use the <> “insert PRT code” button to make your code easier to read. Thank you.

     

    #69339

    Line 1 will hold a logical value (either 0 or 1, False or True), not the time, you should write

    to assign TIMESTART a constant (in this case you could even write the keyword ONCE before the name, but it’s not mandatory).

    Since RETURN is executed at each bar, it will ALWAYS update your chart.

    Lines 2 and 3 miss WHAT data the two functions should return, I assume you wanted to write

    to have the lowest LOW and highest HIGH of the last 20 bars.

    I think what you want is to draw a line at both the highest and lowest price at 10:00am and keep it till next day.

    I’ll write something in a few minutes.

    #69340

    There you go

    is that what you needeed?

    Roberto

    #69342

    Hi Roberto

    thanks so much – the draw segment wasn’t but the rest was – so modified to :

    Much appreciated!!

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

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