Announcement

Collapse
No announcement yet.

Daily calcs on intraday charts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Daily calcs on intraday charts

    Don't know if this has been asked before because I'm not sure what keywords to use in the search.

    What I'm trying to do is return the previous average of 10 Daily bar ATR's (excluding the current day's) and plot a horizontal line on my intraday 5 min chart. So I need the data off the daily bars while I am in my intraday chart. I have tried to use offsetSeries and plug in atr(10, "YM,D") in the hopes that the atr function will know I want the atr of the daily bars (offset by 1, which I think would exclude the current day) rather than the last 10 bars of my intraday chart. Do I have it wrong that the "D" in the parameter does that (and do I need to write my own function to calc this?). Thanks for any help.

  • #2
    Genx
    The correct syntax for the atr study would be var myATR = atr(10,sym("YM Z5,D")).
    Once you have declared the study you can then return the value of the prior bar using myATR.getValue(-1).
    Alternatively you could also retrieve the value directly using atr(10,sym("YM Z5,D"),-1)
    You can find the syntax for all EFS2 functions in the EFS2 Function Reference in the EFS KnowledgeBase
    Alex

    Comment

    Working...
    X