MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Dozens financial books in MetaTrader Market

ATR Levels

Back to topics list To post a new topic, please log in or register
avatar
127
APeng 2012.02.24 09:59
 

I have some questions about ATR Levels indicator. It draws four lines: ATR(t) res, ATR(y) res, ATR(t) sup, ATR(y) sup.

1) What is the difference beetween (t) and (y) ? today, yesterday???

2) res and sup are resistance and support. If I chose e.g. 10 for the period the indicator calculates the average true range of the last 10 periods and then it draws the resistance and support lines into the chart. Let us say the ATR is 50 Pips. Related to what point are resistance and support drawn? Related to the day´s opening price?

Thanks in advance for any comments :-)

 
Gold Tumbles With Silver to Lowest Since 2010 on Dollar
(Corrects scope of BoJ expansion in second paragraph.) Gold and silver fell in New York, slumping to the lowest since 2010, as the dollar strengthened after the Bank of Japan unexpectedly boosted stimulus and the Federal Reserve ended asset purchases this week. The Fed is weighing the timing of interest-rate increases as other central banks add to stimulus to bolster their economies.
avatar
3097
qjol 2012.02.24 11:56 #
 
read the code
avatar
127
APeng 2012.02.24 15:57 #
 
qjol:
read the code

OMG - some answers should better be skipped. I read the code and the questions I have after reading it are posted above.

Really qjol - just don´t answer if your are not willing to help!

 
avatar
791
Ickyrus 2012.02.24 16:19 #
 

As best as I can work out (indicator code is not yet mastered by me) The blue and red lines of the ATR indicator are being translated as lines to the chart for two time frames one timeframe is half of the current timeframe.

 
avatar
9810
WHRoeder 2012.02.24 16:46 #
 
APeng:

I have some questions about ATR Levels indicator. It draws four lines: ATR(t) res, ATR(y) res, ATR(t) sup, ATR(y) sup.

I read the code and the questions I have after reading it are posted above.
You must read and understand the code. You must think. Follow the highlights: red=red, blue=blue, green=your question.
ArrayCopyRates(rates_d1, Symbol(), PERIOD_D1);
fullatr = iATR(Symbol(), PERIOD_D1, ATRPeriod, 1);
L4 = rates_d1[1][3] - fullatr;       // yesterday's High -ADR
H4 = rates_d1[1][2] + fullatr;       // yesterday's low  +ADR
L4t = rates_d1[0][3] - fullatr;      // today's high     -ADR
H4t = rates_d1[0][2] + fullatr;      // today's low      +ADR

ObjectCreate("H4atr label", OBJ_TEXT, 0, Time[0] + timeshift, H4);
ObjectSetText("H4atr label", "ATR(y) res: " + DoubleToStr(H4,4), 8, 

ObjectCreate("L4atr label", OBJ_TEXT, 0, Time[0] + timeshift, L4);
ObjectSetText("L4atr label", "ATR(y) sup: " + DoubleToStr(L4,4), 8, 

ObjectCreate("H4tatr label", OBJ_TEXT, 0, Time[0] + timeshift, H4t);
ObjectSetText("H4tatr label", "ATR(t) res: " + DoubleToStr(H4t,4), 8, 

ObjectCreate("L4tatr label", OBJ_TEXT, 0, Time[0] + timeshift, L4t);
ObjectSetText("L4tatr label", "ATR(t) sup: " + DoubleToStr(L4t,4), 8, 
  1. ATR(t) res, today's low + Average Daily Range (ADR)
  2. ATR(y) res, yestdays's low + ADR
  3. ATR(t) sup, Todays high - ADR
  4. ATR(y) sup. Todays low + ADR
 
avatar
127
APeng 2012.02.25 18:03 #
 
WHRoeder:
You must read and understand the code. You must think. Follow the highlights: red=red, blue=blue, green=your question.
  1. ATR(t) res, today's low + Average Daily Range (ADR)
  2. ATR(y) res, yestdays's low + ADR
  3. ATR(t) sup, Todays high - ADR
  4. ATR(y) sup. Todays low + ADR

Thank you very much WHRoeder, I got it now (as you made it really simple ;) ) !
Back to topics list  

To add comments, please log in or register