FWguideMAofRSI.efs
File Name: FWguideMAofRSI.efs
Description:
Formula Wizard study based on the MA of RSI example found in the Formula Wizard Guide. The study plots the 14 period RSI and a 10 period moving average of the RSI.
Formula Parameters:
NA
Notes:
NA
Download File:
FWguideMAofRSI.efs
EFS Code:
//{{EFSWizard_Description // // This formula was generated by the Alert Wizard // //}}EFSWizard_Description 7532 //{{EFSWizard_Declarations var vRSI14 = new RSIStudy(14, "Close"); var vEMA10_of_vRSI14 = new MAStudy(10, 0, vRSI14, RSIStudy.RSI, MAStudy.EXPONENTIAL); var vLastAlert = -1; //}}EFSWizard_Declarations 20743 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("FWguide MA of RSI"); setCursorLabelName("myRSI", 0); setCursorLabelName("myRSIma", 1); setDefaultBarStyle(PS_SOLID, 0); setDefaultBarStyle(PS_SOLID, 1); setDefaultBarFgColor(Color.red, 0); setDefaultBarFgColor(Color.green, 1); setDefaultBarThickness(1, 0); setDefaultBarThickness(1, 1); setPlotType(PLOTTYPE_LINE, 0); setPlotType(PLOTTYPE_LINE, 1); //}}EFSWizard_PreMain 51329 } 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 new Array( vRSI14.getValue(RSIStudy.RSI), vEMA10_of_vRSI14.getValue(MAStudy.MA) ); //}}EFSWizard_Return 13047 } 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