Counting the bars in an indicator.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #91963 quote
    robert123robert123
    Participant
    Master

    Hi Nicolas et all.

    I need some help please.

    Is it possible to have a count down of the indicator bars?

    I.E

    indicator[102](xyz) I want to have a count down on the indicator period[102].

    Many thanks

    RR

    #91997 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    To access anyone of the last 102 bars you can write:

    FOR i = 0 TO 101
       x = indicator[i](xyz)
    NEXT
    
    //or reverse it
    
    FOR i = 101 DOWNTO 0
       x = indicator[i](xyz)
    NEXT
    #92021 quote
    robert123robert123
    Participant
    Master

    Thank you Robert

    #92060 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    If it does not work try

    indicator(xyz)[i]
    
    // or
    
    indicator(xyz[i])

    Sorry, but I did not test it.

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

Counting the bars in an indicator.


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
robert123 @robert123 Participant
Summary

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

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