Announcement

Collapse
No announcement yet.

Help changing EFS

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

  • Help changing EFS

    Hi all, i have this study that a friend sent to me. I need to use it on FX chart but it only gives me two decimals. 1.22 instead os 1.2220

    can anyone help me change it please





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


    //{{EFSWizard_Declarations

    var vLastAlert = -1;

    //}}EFSWizard_Declarations 2482


    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("");
    setCursorLabelName(".875", 0);
    setCursorLabelName(".75", 1);
    setCursorLabelName(".66", 2);
    setCursorLabelName(".625", 3);
    setCursorLabelName(".50", 4);
    setCursorLabelName(".375", 5);
    setCursorLabelName(".33", 6);
    setCursorLabelName(".25", 7);
    setCursorLabelName(".125", 8);
    setDefaultBarStyle(PS_SOLID, 0);
    setDefaultBarStyle(PS_SOLID, 1);
    setDefaultBarStyle(PS_SOLID, 2);
    setDefaultBarStyle(PS_SOLID, 3);
    setDefaultBarStyle(PS_SOLID, 4);
    setDefaultBarStyle(PS_SOLID, 5);
    setDefaultBarStyle(PS_SOLID, 6);
    setDefaultBarStyle(PS_SOLID, 7);
    setDefaultBarStyle(PS_SOLID, 8);
    setDefaultBarFgColor(Color.blue, 0);
    setDefaultBarFgColor(Color.red, 1);
    setDefaultBarFgColor(Color.green, 2);
    setDefaultBarFgColor(Color.blue, 3);
    setDefaultBarFgColor(Color.red, 4);
    setDefaultBarFgColor(Color.blue, 5);
    setDefaultBarFgColor(Color.green, 6);
    setDefaultBarFgColor(Color.red, 7);
    setDefaultBarFgColor(Color.blue, 8);
    setDefaultBarThickness(1, 0);
    setDefaultBarThickness(1, 1);
    setDefaultBarThickness(1, 2);
    setDefaultBarThickness(1, 3);
    setDefaultBarThickness(1, 4);
    setDefaultBarThickness(1, 5);
    setDefaultBarThickness(1, 6);
    setDefaultBarThickness(1, 7);
    setDefaultBarThickness(1, 8);
    setPlotType(PLOTTYPE_LINE, 0);
    setPlotType(PLOTTYPE_LINE, 1);
    setPlotType(PLOTTYPE_LINE, 2);
    setPlotType(PLOTTYPE_LINE, 3);
    setPlotType(PLOTTYPE_LINE, 4);
    setPlotType(PLOTTYPE_LINE, 5);
    setPlotType(PLOTTYPE_LINE, 6);
    setPlotType(PLOTTYPE_LINE, 7);
    setPlotType(PLOTTYPE_LINE, 8);
    //}}EFSWizard_PreMain 209922

    }

    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(
    ((high()-low())*.875)+low(),
    ((high()-low())*.75)+low(),
    ((high()-low())*.66)+low(),
    ((high()-low())*.625)+low(),
    ((high()-low())*.50)+low(),
    ((high()-low())*.375)+low(),
    ((high()-low())*.33)+low(),
    ((high()-low())*.25)+low(),
    ((high()-low())*.125)+low()
    );
    //}}EFSWizard_Return 46960

    }

    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

  • #2
    I don't think there is a way to increase the number of numbers returned after the decimal on the indicator study area. I believe two numbers are all that will be shown.

    I also trade the FOREX and one way that I have got around the decimal problem is to multiply the value I am returning by 100 to 10,000 depending on what how accurate I want to be.

    In your script instead multiplying the high - low * .75 try multiplying by 75.

    Hope this helps

    Comment

    Working...
    X