MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Update to MetaTrader 4 build 735 and Test the VPS for Free

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 :-)

 
When Markets are Nervous, You Don’t Have To Be
When Markets are Nervous, You Don’t Have To Be
PCWalker | 22 October 2014, 17:49 | Views: 33
By Tyler Yell, CMT, Forex Trading Instructor Talking Points: Why Markets Get Nervous Why Traders Get Nervous How Not To Be Nervous
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
9763
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