Hi Mark,
Thanks for getting back to me. Unfortunately I don't understand your post. How do I relate the start date to the bar index? After that I would use Cum(C)/Cum(1)? regards, SJ I am new AB user and new to programming so any help is appreciated. I am trying to create a moving average that is anchored to a start date. Following the start date for each additional day added to the chart the average length should increase by 1. Since AmiBroker has a ParamDate and an BarIndex there should be a way to calculate the bar index for the start date. If that assumption is correct is it possible to pass a dynamic variable to MA(C, xxx)? Thanks in advance . Spike
