Announcement

Collapse
No announcement yet.

FWguideMAofRSI.efs

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    None.

    Notes:


    Download File:
    FWguideMAofRSI.efs




    EFS Code:
    PHP 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(100vRSI14RSIStudy.RSIMAStudy.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_SOLID0);
        
    setDefaultBarStyle(PS_SOLID1);
        
    setDefaultBarFgColor(Color.red0);
        
    setDefaultBarFgColor(Color.green1);
        
    setDefaultBarThickness(10);
        
    setDefaultBarThickness(11);
        
    setPlotType(PLOTTYPE_LINE0);
        
    setPlotType(PLOTTYPE_LINE1);
    //}}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 
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation
Working...
X