RedeeCash Rate of Change
- Indicatori
- Patrick Odonnell Ingle
- Versione: 1.0
Tasso di cambio
In base alla formula,
ROC = (Close[n] - Close[n-lookback]) / Close[n-lookback] * 100
per tracciare il tasso di variazione dell'azione del prezzo di una coppia di valute in un periodo di ricerca e fornisce due variabili globali, SYMBOL_ROC e SYMBOL_ROC_LOOKBACK, che rappresentano l'ultimo valore del tasso di variazione e il tasso di variazione nel periodo di ricerca precedente.
Invocando l'indicatore utilizzando la funzione iCustom,
iCustom("Market/RedeeCash_Rate_of_Change.ex4",Symbol(),5 ,0,0);
e quindi recuperando le variabili globali,
double roc = GlobalVariableGet(StringConcatenate(Symbol(),"_ROC")); double roc_lookback = GlobalVariableGet(StringConcatenate(Synbol(),"_ROC_LOOKBACK"));
e l'esecuzione del test per verificare una tendenza,
if (roc > roc_lookback && roc > 0) trend="UP"; if (roc < roc_lookback && roc < 0) trend="DOWN";