Announcement

Collapse
No announcement yet.

Creating fixed lines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating fixed lines

    I have made with formula wizard a cci 3 lines in the same panel. However I need to create fixed lines at leveles -100, 0 and 100. can someone help me?
    The efs is this



    //{{EFSWizard_Description
    //
    // This formula was generated by the Alert Wizard
    //
    //}}EFSWizard_Description


    //{{EFSWizard_Declarations
    var vCCI6_of_HLC3 = new CCIStudy(6, "HLC/3");
    var vCCI20_of_HLC3 = new CCIStudy(20, "HLC/3");
    var vCCI50_of_HLC3 = new CCIStudy(50, "HLC/3");
    var vLastAlert = -1;
    //}}EFSWizard_Declarations


    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("cci meu");
    setStudyMin(-300);
    setStudyMax(300);
    setCursorLabelName("vCCI6", 0);
    setCursorLabelName("vCCI20", 1);
    setCursorLabelName("vCCI50", 2);
    setDefaultBarStyle(PS_DOT, 0);
    setDefaultBarStyle(PS_SOLID, 1);
    setDefaultBarStyle(PS_SOLID, 2);
    setDefaultBarFgColor(Color.grey, 0);
    setDefaultBarFgColor(Color.blue, 1);
    setDefaultBarFgColor(Color.magenta, 2);
    setDefaultBarThickness(2, 0);
    setDefaultBarThickness(2, 1);
    setDefaultBarThickness(3, 2);
    setPlotType(PLOTTYPE_LINE, 0);
    setPlotType(PLOTTYPE_LINE, 1);
    setPlotType(PLOTTYPE_LINE, 2);
    //}}EFSWizard_PreMain

    }

    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

    //}}EFSWizard_Expressions


    //{{EFSWizard_Return
    return new Array(
    vCCI6_of_HLC3.getValue(CCIStudy.CCI),
    vCCI20_of_HLC3.getValue(CCIStudy.CCI),
    vCCI50_of_HLC3.getValue(CCIStudy.CCI)
    );
    //}}EFSWizard_Return

    }

    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

    //}}EFSWizard_Actions

  • #2
    Re: Creating fixed lines

    vitorleite
    See my post in this thread in reply to a similar question
    Alex


    Originally posted by vitorleite
    I have made with formula wizard a cci 3 lines in the same panel. However I need to create fixed lines at leveles -100, 0 and 100. can someone help me?
    The efs is this



    //{{EFSWizard_Description
    //
    // This formula was generated by the Alert Wizard
    //
    //}}EFSWizard_Description


    //{{EFSWizard_Declarations
    var vCCI6_of_HLC3 = new CCIStudy(6, "HLC/3");
    var vCCI20_of_HLC3 = new CCIStudy(20, "HLC/3");
    var vCCI50_of_HLC3 = new CCIStudy(50, "HLC/3");
    var vLastAlert = -1;
    //}}EFSWizard_Declarations


    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("cci meu");
    setStudyMin(-300);
    setStudyMax(300);
    setCursorLabelName("vCCI6", 0);
    setCursorLabelName("vCCI20", 1);
    setCursorLabelName("vCCI50", 2);
    setDefaultBarStyle(PS_DOT, 0);
    setDefaultBarStyle(PS_SOLID, 1);
    setDefaultBarStyle(PS_SOLID, 2);
    setDefaultBarFgColor(Color.grey, 0);
    setDefaultBarFgColor(Color.blue, 1);
    setDefaultBarFgColor(Color.magenta, 2);
    setDefaultBarThickness(2, 0);
    setDefaultBarThickness(2, 1);
    setDefaultBarThickness(3, 2);
    setPlotType(PLOTTYPE_LINE, 0);
    setPlotType(PLOTTYPE_LINE, 1);
    setPlotType(PLOTTYPE_LINE, 2);
    //}}EFSWizard_PreMain

    }

    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

    //}}EFSWizard_Expressions


    //{{EFSWizard_Return
    return new Array(
    vCCI6_of_HLC3.getValue(CCIStudy.CCI),
    vCCI20_of_HLC3.getValue(CCIStudy.CCI),
    vCCI50_of_HLC3.getValue(CCIStudy.CCI)
    );
    //}}EFSWizard_Return

    }

    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

    //}}EFSWizard_Actions

    Comment

    Working...
    X