I am willing to hire a programmer who can write this. It shouldn't be very 
  difficult to accomplish. If you are interested mail me please. Thank 
  you.
BR,
MK
--- In amibroker@xxxxxxxxxps.com, 
  "mkecera" <mkecera@xxx> wrote:
>
> Dear All,
> 
  
> I need some help coding the following: I have a system that makes 
  decisions based on the last 500 bars. I would like to detrend the last 500 
  bars by subtracting one bar average return during these 500 bars and use this 
  detrended time series to make decisions. 
> 
> I have no idea how 
  to accomplish this. Can some more experienced code writer advise 
  please?
> 
> Thank you a lot.
> 
> Best 
  regards,
> MK
>