rising (vars Data) : bool
falling (vars Data) : bool
Determines if a series rises or falls, i.e. if Data[0] is above or below Data[1].
Parameters:
Returns:
true if the series rises or falls, false otherwise.
Modifies
rMomentum - Data movement in percent per time frame; indicates the 'speed' of the rising or falling.
Remarks:
- The data series must have a minimum length of
2.
- For a fuzzy logic version, use risingF/fallingF.
- For checking if the series was rising n bars before, use rising(Data+n).
- For checking the amount of rising or falling over a given
time period, use the slope function.
Example:
function run()
{
...
vars Price = series(price());
if(rising(Price))
enterLong();
else
exitLong();
}
See also:
crossOver/Under, peak/valley, risingF/fallingF,
slope series
► latest
version online