Calculation across the last 100 bars only

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15246 quote
    IG_CFD_Trader
    Participant
    Average

    Hi all,

    How do I restrict the code of my indicator to be executed across the last 100 bars only? I do not want the code to be executed over the entire number of bars on the chart. ONLY the last 100 bars.

    I am new to ProBuilder coding language and would appreciate any assistance to my question.

    #15267 quote
    Nicolas
    Keymaster
    Master

    Seems quite difficult, since the history is only loaded once and at that time we can’t know if the current bar is the last (the current candlestick) is really the last one. So even with a loop, I have no solution now .. If you are using the 10.3 version, you could make a loop through the last 100 bars only while restricting your indicator to launch its calculation only at last bar (drawonlastbaronly).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Calculation across the last 100 bars only


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
IG_CFD_Trader @wnakhoul Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years, 3 months ago.

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