Dont Clear Screen between indicator call (persistence drawing)

Forums ProRealTime English forum ProRealTime platform support Dont Clear Screen between indicator call (persistence drawing)

Viewing 4 posts - 1 through 4 (of 4 total)
  • #147346

    Good Evening.

    i need an help. i have write this sample code to understand how many time Prorealtime platform call my indicator and how platform manage screen and drawing.

    code is very simple. it draw only on the last bar call, and if the last bar closing second is even or odd it draw text A or B.

    when i run the indicator, i see on the screen apper line A, then text disappear then appear text line B and so on.

    this i a video i record that explain.

    http://www.mediafire.com/file/4n4zqz2ld1xfiqe/2020-10-13_23-38-06.mkv/file

    i deduce that platform call my indicator for every new price, and within these call platform does nested call for each bar.

    but i deduce also that platform clear screen for every new call associated with new price, otherwise I would have seen both lines of text remain on the screen, both A and B.

    Instead, if line A appears, the B disappears and vice versa, so it means that the screen is cleared before every new call.

    Do you know a way for the screen not to be blanked, at least for a certain indicator, so that what was previously drawn can be left on the screen?

    If i have an indicator that calcuate a value for yesterday and plot it on the screen, that value will be ok forever and i wont’ to recalculate for every price in the future, wasting cpu.

    Or i will have the chance to decide if clear past value or leave on the screen.

     

    #147354

    No, it’s not possible.

    You can add a copy of the above indicator (with a different name) to your chartand set the opposite conditions to plot A & B series.

    So that when it’s odd one will plot A and the other one B. You will always see both.

     

    #147382

    thanks,

    i want to find a way to preserve cpu usage. Imagine you have an indicator that draw a line that from each middle point of a single candle from a starting date in the past to today.

    (ok is a stupid thing, i use it to force a condition which doesnt change…). I can design the line for the first time, and for every new candle i could draw only the new line from last point to new point to the current new point. so i can avoid cpu time to redesign line i the past, which has already been designed on the screen.

    you agree that cpu time used to redesign every time the line in the past is cpu time wasted. This is a perform issue when i use multiple indicator on the same chart or i have multiple chart on same plan, which every single indicator waste cpu time do redesign what is unchanged and will never change.

    I think that will be a nice feature to reduce waste cpu usage and ram usage issue that i noticed has increased in last few weeks (probably due to platform change).

    i think something like a directive like “defparam dont clearscreen”…

     

     

    #147386

    You may suggest that to PRT, they have a suggestion box at https://www.prorealtime.com/en/contact.

    Or you may post it here https://www.prorealcode.com/topic/centralization-of-queries-and-suggestions-on-prorealtime/.

    You can do both.

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

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