I need help in designing an indicator which plots the RSI of a Moving Average. The default values for the moving average should be (10 Period, EMA), and the length of the RSI should be 5. Any help would be greatly appreciated.
Thanks
Thanks
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vEMA10 = new MAStudy(10, 0, "Close", MAStudy.EXPONENTIAL);
var vRSI14_of_vEMA10 = new RSIStudy(14, vEMA10, MAStudy.MA);
var vLastAlert = -1;
//}}EFSWizard_Declarations 17493
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(false);
setStudyTitle("Moving Avg Rsi");
setCursorLabelName("MArsi", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.red, 0);
setDefaultBarThickness(2, 0);
setPlotType(PLOTTYPE_LINE, 0);
//}}EFSWizard_PreMain 29123
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
//}}EFSWizard_Expression_1 0
//}}EFSWizard_Expressions 9063
//{{EFSWizard_Return
return vRSI14_of_vEMA10.getValue(RSIStudy.RSI);
//}}EFSWizard_Return 6068
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1 5589
//}}EFSWizard_Actions 15622
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vEMA10 = new MAStudy(10, 0, "Close", MAStudy.EXPONENTIAL);
var vRSI14_of_vEMA10 = new RSIStudy(14, vEMA10, MAStudy.MA);
var vLastAlert = -1;
//}}EFSWizard_Declarations 17493
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(false);
setStudyTitle("Moving Avg Rsi");
setCursorLabelName("MArsi", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.red, 0);
setDefaultBarThickness(2, 0);
setPlotType(PLOTTYPE_LINE, 0);
addBand(25,PS_SOLID,1,Color.black);
addBand(75,PS_SOLID,1,Color.black);
//}}EFSWizard_PreMain 29123
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
//}}EFSWizard_Expression_1 0
//}}EFSWizard_Expressions 9063
//{{EFSWizard_Return
return vRSI14_of_vEMA10.getValue(RSIStudy.RSI);
//}}EFSWizard_Return 6068
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1 5589
//}}EFSWizard_Actions 15622
Comment