Cumulative Sum for all history

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

    Is there a way for “cumsum” to lookback for complete Data history..?

    I don’t know if a simple summation[barindex](array) could do the trick, I don’t think so…  but…   This is for a kind of Accumulation/Distribution index for returns, but cumsum function only use data loaded on chart as described in reference manual.   I need to force as much history by code if possible  (I’ll wish that to force this on daily timeframe, but I know this is only possible for proscreener code)  🙁

    EXAMPLE:

    RC = cumsum((close/close[1])-1)
    RETURN RC AS "DAILY RETURNS"

    Thanks in Advance mates..!  😉

    #8480 quote
    NicolasNicolas
    Keymaster
    Legend

    There is no kinda instruction to force history load in Probuilder.

    But you could make a loop in x previous bars to force by yourself the cumulation of theses x bars.

Viewing 2 posts - 1 through 2 (of 2 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

Cumulative Sum for all history


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
xel @xel Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
10 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/30/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...