Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

Anglehall

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by Anglehall


  1. That's what is called for i believe. The price of the element is divided by the volume of the whole sample. This means that every time a new element arrives (bar) you need to re weight every single element in the sample with the new total volume of the sample.

     

    After further review for the more robust statistical approach, I believe that the individual elements should be weighted by the bar that is being evaluated total volume and not the accumulated volume of the population.


  2. ShareW already is the total volume (which is what you want)

    each run through you are accumulating the total volume with.

     

    ShareW = ShareW + (UpTicks+DownTicks) ;

     

    I think the short answer is no :) (but I could be wrong)

     

    This: /ShareW

    was

    This: /ShareW[Value1]

     

    I don't believe the original formula attributed variance to the individual independent elements as a 'whole'.

     

    If you use /ShareW you are not evaluating an individual independent element.

    You are evaluating a summation of the individual independent element.

     

    NOTE: I forgot to mention that I'm using the CLOSE and not the avgPrice.


  3. Shouldn't the cumulative volume be relevant to the volume total?

     

    Original:

    Value2 = ((UpTicks[Value1] + DownTicks[Value1])/ShareW) *

    (Square(AvgPrice[Value1]-VolWAPValue)) ;

     

    Modified:

    Value2 = ((UpTicks[Value1] + DownTicks[Value1])/ShareW[Value1]) *

    (Square(AvgPrice[Value1]-VolWAPValue)) ;

     

     

     

     

    vars:
          PriceW                  ( 0 ),
          ShareW                  ( 0 ),
          Count                   ( 0 ),
          VolWAPValue             ( 0 ),
          VolWAPVariance  ( 0 ),
          VolWAPSD                ( 0 ),
          Class                   ("PVP"),
          MyPVP                   ( 0 ) ;
    
    
          if
                  date > date[1]
          then
                  begin
                          PriceW = 0 ;
                          ShareW = 0;
                          Count = -1 ;
                          Value1 = 0 ;
                          Value2 = 0 ;
                          VolWAPValue = 0 ;
                  end;
    
          PriceW = PriceW + (close {AvgPrice} * (UpTicks+DownTicks)) ;
          ShareW = ShareW + (UpTicks+DownTicks) ;
          Count = Count + 1 ;
          Value3 = 0 ;
    
          if
                  ShareW > 0
          then
                  VolWAPValue = PriceW / ShareW ;
    
          For
                  Value1 = 0 To Count
                          Begin
                                  if
                                          0 < ShareW[Value1]
                                  then
                                  Value2 = ((UpTicks[Value1] + DownTicks[Value1])/ShareW[Value1]) *
    (Square(AvgPrice[Value1]-VolWAPValue)) ;
                                  Value3 = Value3 + Value2 ;
                          End;
    
          VolWAPVariance = Value3 ;
          VolWAPSD = round2fraction(SquareRoot(VolWAPVariance)) ;
    
          Plot1(VolWAPValue, "VWAP");
          Plot2(VolWAPValue + VolWAPSD, "1Up");
          Plot3(VolWAPValue - VolWAPSD, "1 Dn");
          Plot4(VolWAPValue + (2*VolWAPSD), "2Up");
          Plot5(VolWAPValue - (2*VolWAPSD), "2Dn");
          Plot6(VolWAPValue + (1.5*VolWAPSD), "1.5 Up");
          Plot7(VolWAPValue - (1.5*VolWAPSD), "1.5 Dn");
          Plot8(VolWAPValue + (.5*VolWAPSD), ".5 Up");
          Plot9(VolWAPValue - (.5*VolWAPSD), ".5 Dn");
    

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.