Helper macros

setf (int Mode, int Flag)

Identical to Mode |= (Flag). Sets a Flag or flag combination in the variable Mode without affecting the other flags. For instance, setf(TradeMode,TR_PHANTOM) sets the TR_PHANTOM flag for the TradeMode variable.

resf (int Mode, int Flag)

Identical to Mode &= ~(Flag). Resets a Flag or flag combination in the variable Mode.

isf (int Mode, int Flag): int

Identical to (Mode&(Flag)). Evaluates to nonzero when the a Flag in the Mode variable is set.  For instance, if(isf(TrainMode,PEAK)) ... checks if the PEAK flag is set in the TrainMode variable.

swap (var a, var b)

Macro that sets a to b and b to a.

Remarks

Example:

function run()
{
  setf(TrainMode,PEAK);
  setf(Detrend,SHUFFLE); 
  ...
}

See also:

set, PlotMode, TrainMode, TradeMode ► latest version online