Code to Analyse Non-Standard Bar History

 

Hello gurus................

Teaching myself MT4 after many years of non coding (old enough that I learnt using FORTRAN!!!) and I'm trying to write some code that will analyse what I'm calling "non standard bar history".

Essentially, I want to find the last N bars (N would be say 4 to 16 typically) that were UP and those that were DOWN. For the UP and DOWN bars separately, I then would like to determine:

SMA (High - Open) 

SMA (High - Low)

SMA (Open - Low)

StdDev of each of the above

 

I've been playing around with some nested loops but can't seem to get anything that works.

Has anyone done this before? Or seen it somewhere else?

Does MT4 have any specific features to this end either than the standard High[], Low[] etc? 

 

Thanks all in advance 

 

Jim 

 
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 

Thanks WHRoeder;

However did not ask anyone to code it FOR me - indeed was careful not to!

The HELP I was looking for, to again state it was:

1. Has anyone done this before?

2. Has anyone seen it somewhere else? (say in an indicator?)

3. Does MT4 have any specific features to this end either than the standard High[], Low[] etc? 

 
If you had "learn to code" you would know the answer to #3
 

Right.

thanks

Reason: