issue call instruction of an indicator with DRAWTEXT

Forums ProRealTime English forum ProScreener support issue call instruction of an indicator with DRAWTEXT

Viewing 10 posts - 1 through 10 (of 10 total)
  • #44656

    Hello,

    I am developping a screener based on a custom indicator. this is used by the call instruction from the screener.

    The screener does not return any result, so I I investigated and it seems to be due to the use of drawtext() in the indicator.

    When I remove the drawtext in my indicator, the screener works.

    Is this a known bug? is there a workaround?

    Many thanks in advance for your help

    #44657

    Code of the indicator: “myindic”

    Code of the screener that calls the indicator:

    if we decomment the line drawtext in the indicator, the screener stops working

    #44669
    AVT

    I assume that all those DRAWxxx commands are proBuilder only commands, something like “bring that value somehow into my window”.

    Flatly spoken I think of 2 different kind of caches, one keeping the calculated value (which in a “normal” RETURN indi as “myindi” command is used by the return funcion directly) and one for the drawings (which is additionally used by DRAWxxx to insert the calculated value into the x/y axis values). And as a DRAWxxx indicator ends with a simple RETURN, the value (which a “normal” indicator would use now) is empty and cannot be accessed any longer (cause it was inserted into the drawing cache and is then gone).

    Your way of changing the last line of the indicator seems the only workaround for me. Just my 2c.

    1 user thanked author for this post.
    #44683

    thx AVT for your answer.

    if I understand well, the presence of DRAWxxx functions in an indicator make it impossible to call it from a screener.

    This is a weird bug / regression.

    #44710

    Very interesting, never seen this problem myself… and I can replicate it, thanks for let us know. While I’m still away from my office, could you please send a bug report to prorealtime to let them know about this problem please (CTRL+M)? I will track this one once I come back for good. You can add the link to this topic, I think it is sufficient to explain the bug.

    #44824

    I got news about this problem. The “coloured” instruction creates a problem that does not return the right value when the indicator is CALL(ED). A quick fix would be to delete the COLOURED of your DRAWTEXT line. This issue should be fixed quickly by PRT dev team. Thanks for reported it 🙂

    2 users thanked author for this post.
    #44972

    thank you Nicolas for the workaround.

    I am not sure to understand. What is the result of the indicator call?

    • is it the value of the RETURN statement?
    • or is it the drawtext (this would be strange…)

    In my case the drawtext –> DRAWTEXT(“•”,barindex,0,monospaced,standard,11) –> this would give 0 I guess

    the RETURN statement gives 1 or 0. It makes more sence that the call takes these values and not what is in the drawtext.

    #45042

    Returned values are only ones in RETURN instruction line of your code.

    1 user thanked author for this post.
    #45981

    Hello Nicolas, any new for this wheather if it is fixed or not?

    Again, I am sorry but it is an ugly bug!

    #46444

    All bugs are ugly IMO 🙂 I don’t know if it has already been fixed (did you try recently?) but I know for sure it will be very soon.

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

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