Force Re-calculation on new bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #72602 quote
    nolantxnolantx
    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
    NicolasNicolas
    Keymaster
    Legend

    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_HedgeFX_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
    NicolasNicolas
    Keymaster
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 NicolasNicolas
8 years, 3 months ago.

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