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.

delta

Members
  • Content Count

    20
  • Joined

  • Last visited

Everything posted by delta

  1. delta

    PVP Code Error

    ND = Day() != Ref(Day(), -1); ///// VWAP and SDs ///// P = (H + L) / 2; VWP = P * V; BI = BarIndex(); BeginBI = ValueWhen(ND, BI); BeginBI = BeginBI[barCount -1]; if(BeginBI < BarCount - 1) { InRange = BI >= BeginBI; CumV = Cum(V * InRange); CumVWP = Cum(VWP * InRange); VWAP = CumVWP / CumV; S = Cum(Ref(CumV, -1) * V * (P - Ref(VWAP, -1))^2 / CumV); Variance = S / CumV; SD = sqrt(Variance); VWAP = IIf(InRange, VWAP, Null); Plot(VWAP, "VWAP", colorYellow, styleNoTitle + styleNoRescale); Plot(VWAP + SD, "+1SD", colorGreen, styleDashed + styleNoTitle + styleNoRescale); Plot(VWAP - SD, "-1SD", colorRed, styleDashed + styleNoTitle + styleNoRescale); Plot(VWAP + 2*SD, "+2SD", colorSeaGreen, styleDashed + styleNoTitle + styleNoRescale); Plot(VWAP - 2*SD, "-2SD", colorOrange, styleDashed + styleNoTitle + styleNoRescale); Plot(VWAP + 3*SD, "+3SD", colorPaleGreen, styleDashed + styleNoTitle + styleNoRescale); Plot(VWAP - 3*SD, "-3SD", colorLightOrange, styleDashed + styleNoTitle + styleNoRescale); } ///// PVP ///// BarSinceND = BarsSince(ND); iStart = Max(BarCount - 1 - BarSinceND[barCount - 1], 0); Top = HighestSince(ND, High); Bot = LowestSince(ND, Low); Range = Top - Bot; BoxesInRange = Range / TickSize + 1; VolUnit = Volume / ((High - Low) / TickSize + 1); VUcount = 0; MaxVUcount = 0; PVP = Null; if(iStart > 0) { for(i = iStart; i < BarCount; i++) { jShift = round((Bot[i - 1] - Low[i]) / TickSize); if((BoxesInRange[i] < BarCount)) { if(jShift > 0) { LastVUcount = VUcount; VUcount = 0; for(j = jShift; j < BoxesInRange[i]; j++) { VUCount[j] = LastVUCount[j - jShift]; } } jStart = round((Low[i] - Bot[i]) / TickSize); jEnd = round((High[i] - Bot[i]) / TickSize); for(j = jStart; j <= jEnd; j++) { VUcount[j] = VUcount[j] + VolUnit[i]; MaxVUcount = Max(MaxVUcount, VUcount[j]); } } } for(j = 0; j < BoxesInRange[barCount - 1]; j++) { if(MaxVUcount == VUcount[j]) PVP = Bot[barCount - 1] + j * TickSize; } Plot(PVP, "PVP", colorTurquoise, styleDots + styleNoTitle + styleNoRescale); } This is the complete code. The error is in PVP portion of the code.
  2. ///// PVP ///// BarSinceND = BarsSince(ND); iStart = Max(BarCount - 1 - BarSinceND[barCount - 1], 0); Top = HighestSince(ND, High); Bot = LowestSince(ND, Low); Range = Top - Bot; BoxesInRange = Range / TickSize + 1; VolUnit = Volume / ((High - Low) / TickSize + 1); VUcount = 0; MaxVUcount = 0; PVP = Null; if(iStart > 0) { for(i = iStart; i < BarCount; i++) { jShift = round((Bot[i - 1] - Low[i]) / TickSize); if((BoxesInRange[i] < BarCount)) { if(jShift > 0) { LastVUcount = VUcount; VUcount = 0; for(j = jShift; j < BoxesInRange[i]; j++) { VUCount[j] = LastVUCount[j - jShift]; } } jStart = round((Low[i] - Bot[i]) / TickSize); jEnd = round((High[i] - Bot[i]) / TickSize); for(j = jStart; j <= jEnd; j++) { VUcount[j] = VUcount[j] + VolUnit[i]; MaxVUcount = Max(MaxVUcount, VUcount[j]); } } } for(j = 0; j < BoxesInRange[barCount - 1]; j++) { if(MaxVUcount == VUcount[j]) PVP = Bot[barCount - 1] + j * TickSize; } Plot(PVP, "PVP", colorTurquoise, styleDots + styleNoTitle + styleNoRescale); } This is the code for PVP which I found in market statistics forum. It is throwing some error : array subscript outof range. This is amibroker code. Can someone help in removing the error please?
  3. I'm little confused. I don't know what is the exact formula to calculate PVP. Infact, I have ensign trial, Ninjacator.com Volume at price indicator, Acme for ninja and amibroker indicator(VAP). All are giving different values? If anyone can suggest a reliable indicator or exact formula to calculate PVP for ninja or amibroker? Thanks.
  4. VJ, What is GAVIN trigger number concept? how is this line drawn? Have not read about it in any vsa book.
  5. Thanks Eiger. I have copy pasted your post to save it for future reference.
  6. Hal thanks. I think I have Taken the first step and now I wont stop. I also use Netbeans.
  7. Mk you have answered my post as well. It looks Iam on the right path with java.
  8. hey I am learning java not because I wanted to do something in TA but because I want to learn some programming language. But after reading above posts I am curious to know where will I stand w.r.t programming for technical and stat analysis visa vis other languages if I learn java language in depth if it is possible. Thanks
  9. I am also facing this problem dont know why?
  10. Tams Thank you for this wonderful indicators. I will be using multicharts soon. therefore, these indicators will be very helpful to me. may I ask you one off topic question? does multichrts support Yahoo Realtime data . thanks.
  11. hi Dutchy I like many here use only price volume chart. only thing I have changed in my metastock is volume bars. 1. Red hollow Bar: Volume less than previous 2 bars 2. Red solid Bar:Volume less than previous bar 3. Green hollow Bar: volume more than previous bar 4. Green solid Bar: volume more than previous 2 bars That's it. Cheers
  12. I read somewhere a post by sebestian, " after seeing signs of strength if there is no demand that does not mean weakness necessarily. It may be that market is resting before making an upmove". is that the point you all are discussing?
  13. hi, I have tried to label vsa on this chart . ofcourse this is my first shot at vsa so please comment how should I improve. thanks niftyvsanalysis.pdf
  14. Hi, Can someone provide the link of Sebastian's pdf of nov. last year? Thanks& regards, Delta
  15. thank you tawe. I am around and reading vsa basics in these threads and from the book. hope I will learn it gradually but surely. delta
  16. my first post but I see activity has subsided hin this thread. why this? keep this good thread going guys.
×
×
  • Create New...

Important Information

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