ATR multiple time scales
Author: gbullr
Creation Date: 10/9/2014 5:59 PM
profile picture

gbullr

#1
Is there an easy way to translate ATR.Series from daily scale to 5 minute scale?

I have a strategy that works on Short on Close and I am trying to have it implemented right before the Close .

On a daily basis it uses the one day ATR and the 60 day ATR.

Obvioulsy multiplying by 78 does not work.

Could one use the SetScaleDaily() function


profile picture

gbullr

#2
Looking at this answer

http://www.wealth-lab.com/Forum/Posts/Intraday-true-range-on-a-Daily-chart-31688


Maybe you can delete my question so as to allow me to look less stupid/lazy?

profile picture

Eugene

#3
Actually, I'm glad that you found the solution.
profile picture

gbullr

#4
Ok. it was too good to be true.

Compiles but something in the logic is wrong that I cannot pinpoint and would appreciate your help.

So trying to calculate Daily ATR on 5 min data.

So I store prior Days Close in dayClose[bar]
Then calculate abs hi- prior close
Then calculate abs lo- prior close
then take the max

(At least this is what I think I am doing)

Appreciate help.

CODE:
Please log in to see this code.
profile picture

Cone

#5
DataSeries.Abs takes the Absolute value of an entire DataSeries. This is not an operation that you put in a loop.

Back up a little. Didn't the script in the solution that you found do what you want? What are you trying to re-invent here?
profile picture

gbullr

#6
I have to look at the prior solution again but I need to have a dataseries of the 1 DAY ATR so that I can see if there is an x over.

profile picture

Cone

#7
1-day ATR is True Range

Here's the solution re-organized to call the Intraday True Range Series as an informal indicator. It plots the True Range with respect to yesterday's close for each intraday bar. If you must have the long period ATR to be based on intraday changes too, then more work is required for that.


CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).