Force Re-calculation on new bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #72602 quote
    nolantx
    Participant
    New

    I have an indicator that works on historical data but flatlines when put on a live chart, rather than reloading the chart by changing the units or time etc. Is there w way to make it recalculate on bar close or some other form of repainting ?

     

    Thanks for any assistance on this.

     

    Ryan.

    #72615 quote
    Nicolas
    Keymaster
    Master

    If you want your indicator to recalculate only one time, just check if the Open is different from a last flagged variable:

    if Open[0] <> flag then 
     //recalculate (paste all code of indi here)
     flag=Open[0]
    endif

    It is a rough idea, but you should understand how you can achieve what you want.

    #72777 quote
    FX_Hedge
    Participant
    New

    Great question – does PRT have the ability to complete a one time “refresh” of the data at each bar close?  It would be nice to know if that feature is available in PRT Charts for indicator development work.

    #72916 quote
    Nicolas
    Keymaster
    Master

    Unless variables are never reset at each new tick received, I do not have any reliable solution for this..

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Force Re-calculation on new bar


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
nolantx @nolantx Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Nicolas
7 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/07/2018
Status: Active
Attachments: No files
Logo Logo
Loading...