Hi. I am trying to use Formula Wizard to generate a horizontal line that is X true ranges above the close of the most recent bar on the chart.
I need to determine one true range value only, which would be the true range as of the most recent bar.
So my formula would 1) calculate the TR as of the most recent bar, 2) add some multiple of TR to the C of the most recent bar, and 3) draw a horizontal line at Y = the resulting sum of the values.
My best approximation so far (in the "Returned Data Points" window) is:
X * vATR[# bars].getValue(ATRStudy.ATR) + getValueAbsolute("Close")
which draws a horizontal line at Y = the most recent close + the TR as of the current (not most recent) bar.
I would appreciate any suggestions for how to generate a line based only on the price and true-range data as of the one most recent bar. Thanks.
I need to determine one true range value only, which would be the true range as of the most recent bar.
So my formula would 1) calculate the TR as of the most recent bar, 2) add some multiple of TR to the C of the most recent bar, and 3) draw a horizontal line at Y = the resulting sum of the values.
My best approximation so far (in the "Returned Data Points" window) is:
X * vATR[# bars].getValue(ATRStudy.ATR) + getValueAbsolute("Close")
which draws a horizontal line at Y = the most recent close + the TR as of the current (not most recent) bar.
I would appreciate any suggestions for how to generate a line based only on the price and true-range data as of the one most recent bar. Thanks.
Comment