Daily ATR on 1 hour charts
Forums › ProRealTime English forum › ProBuilder support › Daily ATR on 1 hour charts
- This topic has 6 replies, 3 voices, and was last updated 3 years ago by robertogozzi.
-
-
03/31/2021 at 6:11 PM #165877
Hi,
I am still on PRT 10.3 and I would like to create an indicator on my 1 hour charts that traces two lines from the close at 11pm (“close”:
a line that is equal to “close”+Daily ATR 14
a line that is equal to “close”-Daily ATR 14Can someone help me build that please?
Thanks
03/31/2021 at 6:52 PM #165881This will use the current Daily value at 110000, if you prefer yesterday’s ATR value at close time, use the line in the comment (UpdateOnClose instead of Default):
123456789Timeframe(Daily,Default) //or Timeframe(Daily,UpdateOnClose) to have yesterday's data at closeMyATR = AverageTrueRange[14](close)//Timeframe(default)IF Time = 110000 THENAtrHI = close + MyATRAtrLO = close - MyATRENDIFRETURN AtrHI AS "Upper Band",AtrLO AS "Lower Band"you may also want to replace TIME with OPENTIME as suits you best.
You may also colour the lines with the indicator properties.
04/01/2021 at 1:14 PM #165939Hi there, this was helpful to me for what I’m trying to do, but I have a problem. I get a calculation error I can’t figure out:
My objective is to draw ATR lines 45 minutes after market open (USA), so 10:15 EST. I just have 000000 now for testing. I want to link the ATR lines to either the current low or high of the day at 10:15 and can float like this for the rest of the day.
1234567891011121314Timeframe(Daily,UpdateOnClose) //or Timeframe(Daily,UpdateOnClose) to have yesterday's data at closeTimeframe(Daily,UpdateOnClose)MyATR = AverageTrueRange[14](close)rmg = (((DHigh(0) - DLow(0))/2)) + DLow(0) //median for day//Timeframe(default)IF (Time => 000000) and (CLOSE > rmg) THENAtrLO = DLow(0)AtrHI = DLow(0) + MyATRelsif (Time => 000000) and (CLOSE < rmg) THENAtrHI = DHigh(0)AtrLO = DHigh(0) - MyATRENDIFRETURN AtrHI AS "Upper Band",AtrLO AS "Lower Band"04/01/2021 at 6:47 PM #165979In CET time (Utc +2), 101500 EST (Utc – 4) is 161500.
In Canada you will have to adjust it to your TZ:
123456789101112131415Timeframe(Daily,UpdateOnClose) //or Timeframe(Daily,UpdateOnClose) to have yesterday's data at closeTimeframe(Daily,UpdateOnClose)MyATR = AverageTrueRange[14](close)rmg = (((High - Low)/2)) + Low //median for dayDayHI = highDayLO = low//Timeframe(default)IF (Time => 161500) and (CLOSE > rmg) THENAtrLO = DayLOAtrHI = DayLO + MyATRelsif (Time => 161500) and (CLOSE < rmg) THENAtrHI = DayHIAtrLO = DayHI - MyATRENDIFRETURN AtrHI AS "Upper Band",AtrLO AS "Lower Band"I replaced DHIGH e DLOW with DayHI and DayLO because I was reported a calculation error.
1 user thanked author for this post.
04/01/2021 at 9:19 PM #16599204/01/2021 at 11:10 PM #165996Replace UpdateOnClose with Default in line 1.
04/01/2021 at 11:44 PM #165997Actually using Default in line 1 makes it useless using the Daily TF.
-
AuthorPosts
Find exclusive trading pro-tools on