Chaikin Money Flow Index
The Chaikin Money Flow oscillator is a momentum indicator that spots buying and selling by calculating price and volume together.
This indicator is based upon Accumulation / Distribution, which is in turn based upon the premise that if a stock closes above its midpoint, (high + low) / 2, for the day then there was accumulation that day, and if it closes below its midpoint, then there was distribution that day.
A buy signal is generated when the indicator is rising and is in positive territory. A sell signal is generated when the indicator is falling and is in negative territory.
set BUY = CMF(15) > 20 AND REF(CMF(15), 1) > 20
Evaluates to buy when the Chaikin Money Flow Index is bullish.