"rulerTimes"

The attribute "rulerTimes" returns or sets the times for a ruler of a trend.

Synopsis

setValue(string shape, "rulerTimes", int area, dyn_time positions);

getValue(string shape, "rulerTimes", int area, dyn_time positions);

shape.rulerTimes(int area, dyn_time positions);

Parameter

Parameter Description
area Trend area. The index starts with 0.
positions The positions where a ruler is set.

Description

The attribute "rulerTimes" returns or sets the times for a ruler of a trend. A ruler for a trend curve is displayed at the specified time. Thus, The attribute changes or stops the running state.

Note that not more than the allowed number of rulers is accepted (the number of rulers can be specified via the attribute "maxRulerCount") even if more "positions" would be specified via the parameter of the same name.

Example

In the following example a ruler is set for a trend curve at the position current time - 60 seconds.

main()
{
  int num = TREND1.numTrendAreas;
  dyn_time t = getCurrentTime() - 60; //returns the current time -60 seconds
  dyn_float f;
  dyn_string dsName;
  for (int i = 0; i < num; i++)
  {
    TREND1.rulerTimes(i,t);
    DebugN("Times", t);
    getValue("TREND1","curveNames",i,dsName); //returns the curve names
    for (int k=1; k<=dynlen(dsName);k++)
    {
      TREND1.curveRulers(dsName[k],f); //sets the curve rulers DebugN(dsName[k]);
    }
  }
}

Assignment

Trend