DEMA without brackets [N]

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #265154 quote
    Tito PeronniTito Peronni
    Participant
    Junior

    Hello,


    I have a question about a script I found where DEMA doesn’t have brackets but does have parentheses. What default value does N take then (in the definition of DEMA I haven’t found anything about it)?


    Thanks in advance!

    #265157 quote
    JSJS
    Participant
    Master

    Hi Tito Peronni,

    It may be that DEMA is written with parentheses in other languages (TradingView), but in ProRealCode the period N is always specified in square brackets…DEMA[N](price)

    In ProRealCode, square brackets always refer to the bar index, and N here represents the period, i.e. the number of bars…

    N is a variable integer period greater than 0 (there is no default period)…

    Iván González, robertogozzi and Bernard13 thanked this post
    #265813 quote
    larouedegannlarouedegann
    Participant
    Master

    For constants adapted to the time unit, square brackets are used; for daily constants, parentheses are used.

    Close[3] The closing price 3 candlesticks ago.

    DClose(3) The closing price 3 days ago.

    robertogozzi and Bernard13 thanked this post
    #265814 quote
    robertogozzirobertogozzi
    Moderator
    Legend


    larouedegann wrote: For constants adapted to the time unit, square brackets are used; for daily constants, parentheses are used. Close[3] The closing price 3 candlesticks ago. DClose(3) The closing price 3 days ago. robertogozzi thanked this post

    This is correct, but when using a DAILY timeframe, Dclose(3) can also be written as Close[3]. The syntax Dclose(n) was intended, in the early days, to access daily data when there was no Multiple TIMEFRAME (mtf) support.


    Iván González and Bernard13 thanked this post
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

DEMA without brackets [N]


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 3 replies,
has 4 voices, and was last updated by robertogozzirobertogozzi
1 week, 3 days ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/16/2026
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...