Script to calculate Average Daily Range? - page 6

 
pj9100:
Thank you. It has come out very well.

Same improvement, bug fix, ...:

For both indicators:

- fixed "wrong" value on "dailyStat" for first hour from "adjTime" (if using "statMode=0") - see picture

for "MP MTF pj9100":

- change ADR calculation (exclude current bar )

for "MP DailyStat:

- revised switch impact (showMTStat) (see picture - like for MP MTF pj9100 indic.)

- added object description on histogram

Thanks to pj9100 for many seggestions ...(Sorry for name of indicator but i have no other idea in that moment)

In the future:

- removed dll - (function for transformation string to currency symbols in mq4)

- i must check all previous posts and suggestions

- ....

 
okfar:
Same improvement, bug fix, ...:

For both indicators:

- fixed "wrong" value on "dailyStat" for first hour from "adjTime" (if using "statMode=0") - see picture

for "MP MTF pj9100":

- change ADR calculation (exclude current bar )

for "MP DailyStat:

- revised switch impact (showMTStat) (see picture - like for MP MTF pj9100 indic.)

- added object description on histogram

Thanks to pj9100 for many seggestions ...(Sorry for name of indicator but i have no other idea in that moment)

In the future:

- removed dll - (function for transformation string to currency symbols in mq4)

- i must check all previous posts and suggestions

- ....

Thank you for all the nice work you have done. For minor amendments, please try to put version no so that there is no confusion. MP Dailystat-v.201, v. 202, v203.

I will let you know my reaction next week .

 

Statistical tool to identify swings and trading patters of the past

Okfar,

You have mastered the technique of making statistical tools. You started with improving daily data (Dailydata V3). Now this indicator will be a feather in your cap.

This will be a simple but a powerful multi-functional reporting tool to do all kinds of manual back testing and plan trading strategies.

It will draw lines/background/shadow candle on the chart for Range/time/day selected

------------------------------------------------------------------------

Input :

Count: example 5000 bars (for back testing)

Currency: one symbol (various symbols to find correlations will be good.)

MTF: M5 to MN

Line: long/short/background/shadow candle

Width:

Style:

Color:

Draw Line at close/open (true/false)

--------------------------------------------

Range/time: true/false

--------------------------------------------

If Range true

Amplitude: Fixed/Variable true/false

If Fixed true:

200 pips / % (example 17%)

If Variable:

150-250 pips /% (example 15%-20%)

Period selected: from: 00:00 1.1.2007 to: 00:00 1.1.2009

Output: (a) Draw lines/shadow on all up and down fixed or variable range bars.

(b) Give statistics how many times fixed or variable range happened during selected period.

-------------------------------------

If time true

Hi-Lo/Close-open/both: 123

Date/Day/Hours: 123

1 Hi-lo will only mark high and low of the time period selected

2 close-open will only mark close-open of the time period

3 Both hi-lo and close-open on the chart for the time period selected

Output: (a) Draw lines/shadow

(b) if selected both then there should be fourth switch to print shadow candle on the screen showing hi-low, close open.

---------

1. If Date true

Time

from: 09.00

to: 09.32

from: 10/02/2009 to :10/02/2009

Use: find out the movement of last news trading or the range during first week of the year or during holiday period when the liquidity is normally thin).

---------

2. If Day true:

From Day:

To Day:

Color of Day: 5 colors with Mo, Tu, We, Th, Fr output on screen showing different colors for the bars.

Use: This will mark on all Mondays to find out whether Monday is a significant day for range movement. Which day is strong and which day is weak be selecting from Monday to Friday.

--------

3. From Hour: 00:00

To Hour:00:00

Use : Hour switch can help create any hour candle which is not provided in MT4. 2 hour, 3 hour, 5 to 23 hours movements.

If I just want to do trading in Asia and want to backtest only Asia sessions for USD/YEN, I will select 00:00 to 08:00 as hours.

------------------------------------------------------------------------

I think as usual you will enjoy doing this because you already have experience doing all this kind of formulas and it will turn out to be very good statistical indicator.

Thank you again.

 

Net change indicators

Great stuff. here are a different way of doing it. Not coded by myself but by several others.

Would it be possible to add a tiemshift function?

As of now it reads the broker time. a timeadjustment would make it perfect.

I cant figure out how to do that.

Any helpers?

Indy attached for daily.

many thanks,

 

Net change indicator

Friends,

Please have a look at the attached and see if ti is useful for your purposes. Not coded by myself.

Is it possible to add a time adjustment function please? I have unsuccessfully tried to add a function which would adjust my broker time to GMT time?

Any to help? Thanks

 
IST:
Friends,

Please have a look at the attached and see if ti is useful for your purposes. Not coded by myself.

Is it possible to add a time adjustment function please? I have unsuccessfully tried to add a function which would adjust my broker time to GMT time?

Any to help? Thanks

Time adjustment input is already there. you just have to put + or - hours in the first input column.

 
Files:
1s.jpg  136 kb
2s.jpg  129 kb
 
IST:
Friends,

Please have a look at the attached and see if ti is useful for your purposes. Not coded by myself.

Is it possible to add a time adjustment function please? I have unsuccessfully tried to add a function which would adjust my broker time to GMT time?

Any to help? Thanks

Sorry, if you want use "timeAdj" switch you must recoded complete indicator.

Why?

For determine high, low, ... etc is used daily candle. This candle always start with time 00:00 of broker time.

........

 

Indicator MP MTF pj9100.mq4 -> MP MTF pj9100 v0.10.mq4

-fixed start of the week for weeks with start in previous monath

Files:
 

I am attaching an indicator done by CJA, a highly-regarded programmer on this forum, which produces lines (borders) of varying length. If you select . In this one start hour and minutes are given and the lines (borders) are marked at that time each day. My idea for input parameters are from this indicator.

Files:
Reason: