Summation

See Also...

Related Topics

 

 

Description

This formula adds the prices in a range.

 

 

Formula

Summation(instrument, price, length, targetBar)=begin

  i=0

  total=0

 

  if length > 0 then begin

    while i < length do begin

      total = total + GetPrice(instrument, price, i, length)

      i=i+1

    end

  end

  total

end

 

 

Parameters

instrument

An instrument.

 

price

The price parameter identifies the bate, or price, to evaluate. Use the BATE constants to identify price.

 

length

The Summation formula calculates a running total of number in a series. The length parameter defines the size of the series.

 

targetBar

The bar, as oriented with the current bar, you want to evaluate.

 

 

Return Value

A sum

 

 

Examples

...

  UpEQ = Summation(instrument, BATE_INDEXxCLOSE, Length, targetBar) - Length * AveragePrice(instrument, BATE_BARINDEX, Length, targetBar) * AveragePrice(instrument, BATE_CLOSE, Length, targetBar)

...

 

 

Comments

NA

 

©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.