Uploading a custom indicator.

Forums ProRealTime English forum ProRealTime platform support Uploading a custom indicator.

Viewing 6 posts - 1 through 6 (of 6 total)
  • #223106

    I am attempting to upload a custom indicator. The code has been written into the appropriate window in Pro-RealTime. When I press the ‘add to chart’ button I receive the error message – “An indicator code must end with the keyword RETURN to define what to display”. My code DOES end with the word RETURN. Am I missing something? Thanks, Charles.

    #223107

    If you don’t want to post the full code then post the last 5 or 6 lines; somebody may then have ideas as to source of the problem.

    #223109

    Thanks.

    The last few lines of code read:

    If H > fHigh Then ‘ If we found a higher high
    fHigh = H ‘ Record new high
    End If
    If L < fLow The ‘ If we found a lower low
    fLow = L ‘ Record new low
    End If
    End If

    RETURN

    All help will be greatly appreciated.

     

     

    #223110

    Hi, you can try these lines instead:

     

    More details why in next post

    #223111

    Several errors prevented the code to understand it in PRT, and the return word in the end couldn’t be read as such in the wake of all preceding errors.

    List of errors:

    – using ‘ instead of // to add comments at end of lines, makes it read the words of the attempted comments as coding language with errors

    – using H which is an old reserved word for hours even if not used now, you can replace it elsewhere too in the code with “myH” or another name if you don’t like myH

    – there are 3 endif for 2 if, I have commented out one of them (unless it was associated to a third “if” not given in the copy paste adding to the confusion, in which case you can leave it in instead…

    Chances are: it wasn’t a PRT code to start with, and if that’s the case, there’s a high probability to have several more errors inside the rest of your code still preventing it from working despite fixing these few lines.

    1 user thanked author for this post.
    #223119

    Hi,

    Many thanks for your two responses.

    You’re right, it’s not PRT code originally. I tried your alternative lines which did not work, so I think there must be other errors. I think I’m going to have to get a coder to help with this problem.

    Thank you very much for your prompt assistance.

    Charles

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

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