Announcement

Collapse
No announcement yet.

Help on new EFS

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

  • Help on new EFS

    I have been trying to do this one without success so far.
    Regular Volume study EFS that I can set min and max values to and 1 addbar line so I can get my bearings. Alex, we talked about this but still can't figure it on the wizzard. Would appreciate if you could do it and I will just change the min and max and add band levels.

    Thanks.
    Earlinarizona

  • #2
    Bar coloring

    On the volume EFS color change would be based on last bar like in regular volume study and not on Color bar based on current bar price.
    Forgot to mention that.
    Earlinarizona

    Comment


    • #3
      Earl
      I think the enclosed efs does what you asked.
      Through Edit Studies you can modify the parameters for StudyMax, StudyMin and AddBand.
      Alex

      PHP Code:
      function preMain(){

      setPriceStudy(false);
      setStudyTitle("Volume");
      setCursorLabelName("Volume");
      setDefaultBarFgColor(Color.blue);
      setPlotType(PLOTTYPE_HISTOGRAM);

          var 
      fp1 = new FunctionParameter("Max"FunctionParameter.NUMBER);
          
      fp1.setLowerLimit(0);
          
      fp1.setDefault(1000000);
          
          var 
      fp2 = new FunctionParameter("Min"FunctionParameter.NUMBER);
          
      fp2.setLowerLimit(0);
          
      fp2.setDefault(0);
              
          var 
      fp2 = new FunctionParameter("Band1"FunctionParameter.NUMBER);
          
      fp2.setLowerLimit(0);
          
      fp2.setDefault(500000);
              
      }

      function 
      main(MaxMinBand1){

      setStudyMax(Max);
      setStudyMin(Min);
      addBand(Band1,PS_SOLID,1,Color.red,10);

      if(
      volume()>volume(-1))
      setBarFgColor(Color.blue);
      if(
      volume()<volume(-1))
      setBarFgColor(Color.red);
      if(
      volume()==volume(-1))
      setBarFgColor(Color.lightgrey);

      return 
      volume();

      Comment

      Working...
      X