Drawing randomize data with historical bars

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208915 quote
    paullyons
    Participant
    New

    Hello, everyone.

    I’ve made my indicator to draw randomize data with historical bars.

    I used “lastbarupdated” and indicator draw each time when the price update.

    How can I fix this problem. I’ve been trying to solve this problem, but yet not. I’ve tried like this.

    if lastbarupdated and open <> tag then

    … ….

    tag = open

    end if

    Please help me. Thanks.

    #208917 quote
    robertogozzi
    Moderator
    Master

    Do not append unrelated posts to existing topics. Create s new one, instead, using a clear and relevant title.

    Thank you 🙂

    It’s islastbarupdate, not lastbarupdated.

    #208930 quote
    Nicolas
    Keymaster
    Master

    A classic variable reset to 0 (null value) on each tick received. You have to use an array variable to store the past value contained in the same bar in live, such as :

    if islastbarupdate and open <> $tag[0] then
    
     $tag[0] = open
    
    end if
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Drawing randomize data with historical bars


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
paullyons @paullyons Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/01/2023
Status: Active
Attachments: No files
Logo Logo
Loading...