Counting the bars in an indicator.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #91963 quote
    robert123
    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
    robertogozzi
    Moderator
    Master

    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
    robert123
    Participant
    Master

    Thank you Robert

    #92060 quote
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
6 years, 11 months ago.

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