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!
JSParticipant
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)…
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.
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.