Scripts: Simple daily range script

 

Simple daily range script :

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

Author: Rafael

 

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

 
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

Reason: