VWAP Date anchored + ORARIO
Forums › ProRealTime forum Italiano › Supporto ProBuilder › VWAP Date anchored + ORARIO
- This topic has 3 replies, 2 voices, and was last updated 1 month ago by robertogozzi.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
11/14/2024 at 4:49 PM #240381
Salve.
Per un uso su time frame intraday (es.-1H) è possibile aggiungere l’ora/minuti al seguente codice ?
esempio che il vwap sia ancorato sulla barra del giorno es. 202141018 alle ore es. 15.00.
Grazie
Saluti
VWAP Date anchored + orario12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758startDate=20141018VWAP=undefinedSDup1 = undefinedSDlw1 = undefinedSDup2 = undefinedSDlw2 = undefinedSDup3 = undefinedSDlw3 = undefinedif opendate=startDate thenstartbar=barindexendifif opendate>=startDate thenbarcount=barindex-startbard = max(1, barcount)src = customcloseif volume > 0 THENVWAP = summation[d](Volume * src)/summation[d](Volume)ENDIFif(barcount=0) thensd = 0elsep1 = summation[d](Volume * src)p2 = summation[d](Volume)p3 = summation[d](Volume * src * src)ma = p1/p2ma2 = p3/p2sd = SQRT(ABS(ma2 - ma * ma) )endifif viewSD thenSDup1 = vwap+sdSDlw1 = vwap-sdSDup2 = vwap+sd*2SDlw2 = vwap-sd*2SDup3 = vwap+sd*3SDlw3 = vwap-sd*3endifSDup1 = vwap+sd*1SDlw1 = vwap-sd*1SDup2 = vwap+sd*2SDlw2 = vwap-sd*2SDup3 = vwap+sd*3SDlw3 = vwap-sd*3endifR=1G=1B=1RETURN VWAP coloured(R,G,B) as "VWAP", SDup1 coloured(R,G,B) as "upper 1 STD", SDlw1 coloured(R,G,B) as "lower 1 STD", SDup2 coloured(R,G,B) as "upper 2 STD", SDlw2 coloured(R,G,B) as "lower 2 STD", SDup3 coloured(R,G,B) as "upper 3 STD", SDlw3 coloured(R,G,B) as "lower 3 STD"11/14/2024 at 5:48 PM #240383Cosa intendi per “ancorato“?
11/14/2024 at 6:42 PM #240386Ancorato nel senso che decidi tu da quale giorno deve inziare il vwap (per semplicità nel codice ho impostato il 18 ottobre 2024).
Vorrei aggiungere la possibilità di decidere anche l’orario per poterlo usare in un time frame intrday.
11/17/2024 at 11:52 AM #240431Ecco, ho aggiunto anche l’orara d’inizio (starttime):
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859once startDate=20240108once starttime=090000once VWAP = undefinedonce SDup1 = undefinedonce SDlw1 = undefinedonce SDup2 = undefinedonce SDlw2 = undefinedonce SDup3 = undefinedonce SDlw3 = undefinedif (opendate=startDate) AND (opentime=starttime) thenstartbar=barindexendifif (opendate>startDate) or (opendate=startDate) and (opentime>=starttime) thenbarcount=barindex-startbard = max(1, barcount)src = customcloseif volume > 0 THENVWAP = summation[d](Volume * src)/summation[d](Volume)ENDIFif(barcount=0) thensd = 0elsep1 = summation[d](Volume * src)p2 = summation[d](Volume)p3 = summation[d](Volume * src * src)ma = p1/p2ma2 = p3/p2sd = SQRT(ABS(ma2 - ma * ma) )endifif viewSD thenSDup1 = vwap+sdSDlw1 = vwap-sdSDup2 = vwap+sd*2SDlw2 = vwap-sd*2SDup3 = vwap+sd*3SDlw3 = vwap-sd*3endifSDup1 = vwap+sd*1SDlw1 = vwap-sd*1SDup2 = vwap+sd*2SDlw2 = vwap-sd*2SDup3 = vwap+sd*3SDlw3 = vwap-sd*3endifR=1G=1B=1RETURN VWAP coloured(R,G,B) as "VWAP", SDup1 coloured(R,G,B) as "upper 1 STD", SDlw1 coloured(R,G,B) as "lower 1 STD", SDup2 coloured(R,G,B) as "upper 2 STD", SDlw2 coloured(R,G,B) as "lower 2 STD", SDup3 coloured(R,G,B) as "upper 3 STD", SDlw3 coloured(R,G,B) as "lower 3 STD" -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: