Announcement

Collapse
No announcement yet.

Opps forgot to attach the EFS. Here it is

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

  • Opps forgot to attach the EFS. Here it is

    var study = new StochStudy(8, 3, 3);

    function preMain()
    {
    setStudyTitle("Stoch 8,3,3");

    setCursorLabelName("% K",0);
    setCursorLabelName("% D",1);

    setDefaultBarFgColor(Color.lime, 0); // %K
    setDefaultBarFgColor(Color.red, 1); // %D

    setDefaultBarThickness(2,0)
    setDefaultBarThickness(2,1)
    setPlotType(PLOTTYPE_INSTANTCOLORLINE);
    addBand(80, PS_SOLID, 1, Color.purple);
    addBand(70, PS_SOLID, 1, Color.purple);
    addBand(30, PS_SOLID, 1, Color.purple);
    addBand(20, PS_SOLID, 1, Color.purple);
    setStudyMin(10);
    setStudyMax(85);
    }

    function main()
    {
    var vFAST = study.getValue(StochStudy.FAST);
    var vSLOW = study.getValue(StochStudy.SLOW);

    if(vFAST > vSLOW) //Entry to a long
    {
    setBarBgColor(Color.green);
    }
    else if(vSLOW > vFAST) //Exit from a long
    {
    setBarBgColor(Color.maroon);
    }
    else if(vFAST > vSLOW) //Exit from short level
    {
    setBarBgColor(Color.green);
    }
    else if(vSLOW > vFAST) //Entry to short level
    {
    setBarBgColor(Color.maroon);
    }


    return new Array(vFAST, vSLOW);
    }

  • #2
    The problem with Addbands not being on top is an old one in EFS (been around since the start). I have been told that they will fix this issue, but so far even the latest beta doesn't have it fixed. Hopefully soon...

    As a work around, just add the band line values as part of the return values:

    var UpBand1 = 80;
    var UpBand2 = 75;
    var DnBand1 = 20;
    var DnBand2 = 25;

    .
    .
    .


    return new Array (MyValue, MyValue2, UpBand1, UpBand2, DnBand1, DnBand2);
    Garth

    Comment


    • #3
      Earl
      See my reply in your other message.
      Here is the efs that returns the following (see image)
      Alex

      Attached Files

      Comment


      • #4
        As an addition to Alex's email, if all those band values in the cursor window bug you, you can right click on the cursor window and remove the checkbox next to their name(s) and they will no longer be displayed.

        Garth
        Garth

        Comment

        Working...
        X