Reply To: ATR% of Close Price

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

#57931
MathewMathew
  • Topics: 28
  • Replies: 1,335
  • Posts: 1,363

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

Mathew

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.

Close