"refOrigin";

Defines the origin of the reference value for the bars.

Synopsis

setValue(string shape, "refOrigin", int pos);

getValue(string shape, "refOrigin", int &pos);

shape.refOrigin(int pos);

Parameters

Parameter Description
shape Name of the object
pos

Valid constants are:

BAR_BOTTOM,

BAR_TOP,

BAR_CENTER and

BAR_AVERAGE

Description

This attribute can be used to specify the position on the Y-axis of the reference value for the bars. The value is applied from the bottom (BAR_BOTTOM), from the top (BAR_TOP), in the centre (BAR_CENTER) or from the average of all Y values (BAR_AVERAGE).

Example

The following example sets a new reference point and changes the tolerance limits and colors.

main()
{
  shape bt=getShape("BAR_TREND1");
  // New reference value
  bt.refOrigin=BAR_BOTTOM;
  bt.refValue=50;
  // Tolerance limits and colors
  bt.colorTolHigh="Red";
  bt.colorTolLow="Red";
  bt.colorTolOK="Green";
  bt.tolHigh=100; // 100% => 100
  bt.tolLow=60; // 60% => 20!!!
  // Color range
  bt.colorChange=BAR_ELEMENT;
  // Update bar trend
  bt.flush();
}

Assignment

Bar trend