Announcement

Collapse
No announcement yet.

FVE-katsanos.efs Error in Formula - TS Support

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

  • FVE-katsanos.efs Error in Formula - TS Support

    Could someone please correct the following script. It is not the same formula as that of Mark Katsanos. In an article Katsanos keeps a running tab of the total Volume and the +/- Volume. In the following script the total Volume (variable sum) is correct however the +/-Volume is not dealt with properly. A running total of the +/-Volume (variable vlm) should be kept. The running total should be kept over the "period" length.

    If this does not make sense send me an email and I will send you a spread sheet with the proper formula so you can see what I am talking about.

    Thanks
    [email protected]
    Attached Files

  • #2
    Dear Stephen,

    Could you please check the modified indicator below and let me know how it works.

    Thank you,
    Robert


    /**********************************************
    Description : This Indicator plots the Finite Volume Elements
    Provided By : TS Support, LLC for eSignal
    **********************************************/

    function preMain(){
    setStudyTitle("Finite Volume Elements");
    setCursorLabelName("FVI",0);
    setDefaultBarFgColor(Color.green,0);
    setComputeOnClose();
    setDefaultBarThickness(2);
    }

    function main(Period){
    if(Period == null)
    Period = 22;
    var FVE = 0, MF = 0, vlm = 0, Sum = 0;

    for(i = - Period + 1; i <= 0; i++){
    MF = 0;
    MF = close(i) - (high(i) + low(i)) / 2 + (high(i) + low(i) + close(i)) / 3 - (high(i - 1) + low(i - 1) + close(i - 1)) / 3;
    if(MF > .3 * close(i) / 100)
    vlm += volume(i);
    else if(MF < -.3 * close(i) / 100)
    vlm -= volume(i);
    Sum += volume(i);
    }
    VolumeMA = Sum / Period;
    FVE += ((vlm / VolumeMA) / Period) * 100;

    return FVE;
    }
    Attached Files

    Comment


    • #3
      Dear Robert,
      That is it. It works perfectly.

      Thank you

      Comment

      Working...
      X