Reply To: ATR% of Close Price

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

  • Topics: 32
  • Replies: 1,710
  • Posts: 1,742

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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.