Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free

Genuine reviews from real traders, not fake reviews from stealth vendors

Quality education from leading professional traders

We are a friendly, helpful, and positive community

We do not tolerate rude behavior, trolling, or vendors advertising in posts

We are here to help, just let us know what you need

You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

New to this forumn I am looking for formula /code for the mean absolute deviation not a fixed parameter one but a variable period like what vwap is , a variable period volume weighted average . I have already written and done a formula for a variable period standard deviation because there are a couple of alternate formulas to produce the same result . But the mean absolute is proving rather difficult . The formula itself is fairly straight forward but it is proving difficult to code . I do not have a lot of experience in languages , the platform I use is Neoticker and the language they use is called "formula language" . Any help would be appreciated.

THx

Can you help answer these questions from other members on NexusFi?

***************************************************************************
You said: "The formula itself is fairly straight forward", could you post the formula, and maybe we can help..

the formula is just taking the average distance away from the mean e.g. ;

take the following numbers:

1,2,3,4

add them up and divide by number of data points (4) :

(1+2+3+4)/4 =2.5 this is the mean ;

then take the mean and subtract that from each value;

(1-2.5)+(2-2.5)+(3-2.5)+(4-2.5) this gives us the following :

(-1.5)+(-0.5)+(0.5)+(1.5) at this point some we take the absolute value of the data points which basically
means get rid of the negative sign and add them up :

(1.5)+(0.5)+(0.5)+(1.5) = 4 then take this number and divide by number of data points ;

4/4 = 1 this is the mean absolute deviation.

The part I am having a problem with is the part where you subtract the mean from all the previous data points , I do not know how to loop back to previous values...