Reply To: ATR% of Close Price

Optuma Forums Optuma Scripting ATR% of Close Price Reply To: ATR% of Close Price

  • Topics: 40
  • Replies: 2,010
  • Posts: 2,050

Hi Brad,

Just remember to add parenthesis. It’s not always needed but my OCD programming brain always wants to remove all doubt.

One way your script could be processed is

ATR(Bars=30) divided by (Close()[1] < 15/100)

Close()[1] < 15/100 will evaluate to either 1 (true) to 0 (false).

Precedence of operators should make sure that never happens but I still like to be explicit on these things. Perhaps early tesing of scripting has scared me!

Make your script

(ATR(BARS=30)/CLOSE() [1]) < 15/100

All the best


Pin It on Pinterest