Drawing randomize data with historical bars

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208915 quote
    paullyonspaullyons
    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
    robertogozzirobertogozzi
    Moderator
    Legend

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

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

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

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