RedeeCash Rate of Change
- Indicators
- Patrick Odonnell Ingle
- Version: 1.0
Rate of Change
Base on the formula,
ROC = (Close[n] - Close[n-lookback]) / Close[n-lookback] * 100
to plot the rate of change of a currency pair price action over a lookback period, and provides two global variables, SYMBOL_ROC and SYMBOL_ROC_LOOKBACK, which represent the latest Rate of Change value and the Rate of Change at the previous lookback period.
Invoking the indicator using the iCustom function,
iCustom("Market/RedeeCash_Rate_of_Change.ex4",Symbol(),5 ,0,0);
and then retrieving the global variables,
double roc = GlobalVariableGet(StringConcatenate(Symbol(),"_ROC")); double roc_lookback = GlobalVariableGet(StringConcatenate(Synbol(),"_ROC_LOOKBACK"));
and performing the test to verify a trend,
if (roc > roc_lookback && roc > 0) trend="UP"; if (roc < roc_lookback && roc < 0) trend="DOWN";