Hi How to i write the code to allow for different types of moving average to be selected as well as different types on close. so ave = “Average type” [p1] (close type) and do i have to change anything on the variables type to make this work. Grant