Reply To: ATR Exit

Optuma Forums Optuma Scripting ATR Exit Reply To: ATR Exit

#47983
Mathew
Mathew
  • Topics: 15
  • Replies: 823
  • Posts: 838

Hi Jane,

The ATRTSCAN is a special function that is used in the stop section of the back tester. I’m not 100% sure why, but it does not work in a script (something we’ll check out).

In the mean time, this is a script that will work for you.

a1 = ATR(BARS=15, MULT=2.00);

CLOSE() CrossesBelow (HIGH()[1] – a1[1])

we calculate the ATR and store it in “a1”. Then we see if today’s close crosses below yesterday’s value of high minus the atr by using the “[1]” offset.

Hope that helps

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