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.

proton242

Members
  • Content Count

    6
  • Joined

  • Last visited

Personal Information

  • First Name
    proton242
  • Last Name
    242
  • Country
    Italy

Trading Information

  • Vendor
    No
  • Favorite Markets
    futures, forex
  1. Hi, someone know how make this indicator for create weekly and monthly charts? Thank you
  2. Many thanks BlowFish, i try to add remaining code. Thank you again!
  3. BlowFish another big help, rather than insert number of days is possible insert date range? Like "from day x to day y"? Thank you
  4. BlowFish i really don't know how to thank you for your help, your script work very well! Thank you again, :thumbs up:
  5. Many thanks BlowFish for your reply, i have an error when i try to compile my VWAP code, this is the code that i use: [LegacyColorValue = true]; vars: PriceW(0), ShareW(0), Count(0), VolWAPValue(0), VolWAPVariance(0), VolWAPSD(0), Class("PVP"), InfoMap(MapSN.New), MyPVP(0); if date > date[1] then begin PriceW = 0; ShareW = 0; Count = -1; Value1 = 0; Value2 = 0; VolWAPValue = 0; end; PriceW = PriceW + (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 Value2 = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[Value1]-VolWAPValue)); Value3 = Value3 + Value2; End; VolWAPVariance = Value3; VolWAPSD = SquareRoot(VolWAPVariance); Value1 = ADE.GetBarInfo(Class, GetSymbolName, ADE.TypeZeroInterval(11,1), ADE.BarID, InfoMap); MyPVP = MapSN.Get(InfoMap, "PVP"); Plot1(VolWAPValue, "VWAP"); Plot2(VolWAPValue + VolWAPSD, "VWAP1SDUp"); Plot3(VolWAPValue - VolWAPSD, "VWAP1SDDown"); Plot4(VolWAPValue + (2*VolWAPSD), "VWAP2SDUp"); Plot5(VolWAPValue - (2*VolWAPSD), "VWAP2SDDown"); Plot6(VolWAPValue + (3*VolWAPSD), "VWAP3SDUp"); Plot7(VolWAPValue - (3*VolWAPSD), "VWAP3SDDown"); Plot8(MyPVP, "PVP"); when i add your additional code the new VWAP is like this: [LegacyColorValue = true]; vars: PriceW(0), ShareW(0), Count(0), VolWAPValue(0), VolWAPVariance(0), VolWAPSD(0), Class("PVP"), InfoMap(MapSN.New), MyPVP(0); Input: NumberofDays (1), if date > date[1] then begin n = n + 1; if n = NumberofDays then begin //reset code goes in here s = 0; n = 0; VWAP1 = VWAP; SD1 = SD; VWAP = 0; SumWeights = 0; SumWeightsOld = 0; VWAPOld = 0; end; PriceW = PriceW + (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 Value2 = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[Value1]-VolWAPValue)); Value3 = Value3 + Value2; End; VolWAPVariance = Value3; VolWAPSD = SquareRoot(VolWAPVariance); Value1 = ADE.GetBarInfo(Class, GetSymbolName, ADE.TypeZeroInterval(11,1), ADE.BarID, InfoMap); MyPVP = MapSN.Get(InfoMap, "PVP"); Plot1(VolWAPValue, "VWAP"); Plot2(VolWAPValue + VolWAPSD, "VWAP1SDUp"); Plot3(VolWAPValue - VolWAPSD, "VWAP1SDDown"); Plot4(VolWAPValue + (2*VolWAPSD), "VWAP2SDUp"); Plot5(VolWAPValue - (2*VolWAPSD), "VWAP2SDDown"); Plot6(VolWAPValue + (3*VolWAPSD), "VWAP3SDUp"); Plot7(VolWAPValue - (3*VolWAPSD), "VWAP3SDDown"); Plot8(MyPVP, "PVP"); but i have an error when i try to compile '(' Expected errLine 19, errColumn 3, errLineEnd 19, errColumnEnd 3 causal study: (Function) errLine 19 it's if date > date[1] then begin , you know why? Thank you
  6. Someone know how to build weekly and monthly VWAP chart? Thank you!
×
×
  • Create New...

Important Information

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