Download MetaTrader 5
To add comments, please log in or register
Having questions to the author of an article? Discuss them on the Forum!
MetaQuotes Software Corp.
Moderator
177132
MetaQuotes Software Corp. 2009.08.05 12:38 

Simple daily range script :

Script for calculation average daily range for last agoYear-"calendar" years, last agoMonth - calendar months, ......

Author: Rafael

MQL4 Comments
16309
MQL4 Comments 2009.08.05 23:13  

This is a nice piece of work! But there are things I dont understand:

Could you explain how does the external variable work-e.g. what exactly should I input, to receive a calculation for last 6 months and last year?

Thanks in advance for explanations!

I've also found a minor error: e.g. when you put the script in GBPJPY, the script says that minimal value occurred on 20.07.2009 and actually it was a day earlier.

Cheers,

Tom

Rafael
291
Rafael 2009.08.06 04:49  
ziebol1:

This is a nice piece of work! But there are things I dont understand:

Could you explain how does the external variable work-e.g. what exactly should I input, to receive a calculation for last 6 months and last year?

Thanks in advance for explanations!

I've also found a minor error: e.g. when you put the script in GBPJPY, the script says that minimal value occurred on 20.07.2009 and actually it was a day earlier.

Cheers,

Tom

I was chnges script file (actual file Histo ranges_v0.10.mq4).

Corrected errors in the determination of the date of the minimum and maximum rank.

Input for calculation:

- last 6 months :

agoYear=0, agoMonth=6, agoWeek=0, agoDays=0

- last year :

  1. agoYear=1, agoMonth=0, agoWeek=0, agoDays=0
  2. agoYear=0, agoMonth=12, agoWeek=0, agoDays=0
  3. agoYear=0, agoMonth=0, agoWeek=0, agoDays=365
  4. agoYear=0, agoMonth=0, agoWeek=52, agoDays=1

- last 18 months :

  1. agoYear=1, agoMonth=6, agoWeek=0, agoDays=0
  2. agoYear=0, agoMonth=18, agoWeek=0, agoDays=0

Rafael

/
To add comments, please log in or register