Diff

See Also...

Related Topics

 

 

Description

This formula calculates the difference between two numbers.

 

 

Formula

Diff(value1, value2)=begin

  retval = value1 - value2

end

 

 

Parameters

value1

A number.

 

value2

Another number.

 

 

Return Value

A difference.

 

 

Examples

RealBodyMidPoint(instrument, targetBar)=begin

  pOpen = GetPrice($1, BATE_OPEN, targetBar, 0)

  pClose = GetPrice($1, BATE_CLOSE, targetBar, 0)

  nvSub = Abs(Diff(pOpen, pClose)) / 2

  if BlackBody($1, targetBar) == TRUE then retval = pClose + nvSub else retval = pClose - nvSub

end

 

 

Comments

NA

 

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