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
Personal Information
-
First Name
TradersLaboratory.com
-
Last Name
User
-
City
nd
-
Country
India
-
Gender
Male
Trading Information
-
Vendor
No
-
delta started following Trading With Market Statistics I. Volume Histogram, PVP Code Error and Is China a Bubble ?
-
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.
-
///// 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?
-
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.
-
can someone compare India & China?
- 58 replies
-
- bubble
- chinese economy
-
(and 2 more)
Tagged with:
-
VJ, What is GAVIN trigger number concept? how is this line drawn? Have not read about it in any vsa book.
-
Thanks Eiger. I have copy pasted your post to save it for future reference.
-
Hal thanks. I think I have Taken the first step and now I wont stop. I also use Netbeans.
-
Mk you have answered my post as well. It looks Iam on the right path with java.
-
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
-
I am also facing this problem dont know why?
-
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.
-
Best Program Supporting Indicators Written in Java?
delta replied to kappert's topic in Tools of the Trade
Which trading product use java? -
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
- 2244 replies
-
- technical analysis
- volume spread analysis
-
(and 2 more)
Tagged with:
-
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?
- 2244 replies
-
- technical analysis
- volume spread analysis
-
(and 2 more)
Tagged with:
-
his web address is traderscode.com