Stampare solo per la giornata odierna
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Stampare solo per la giornata odierna
- This topic has 3 replies, 2 voices, and was last updated 5 days ago by
Iván.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
03/24/2025 at 12:44 PM #245204
Salve chiedo aiuto per una modifica al codice. Quando la condizione ShowpastFibo = 0 dovrebbe disegnare le linee solo per la giornata odierna (es. future Stoxx , TF 30 muniti).
Fibo1234567891011121314151617181920212223242526272829303132333435363738394041424344454647//////TF 30 minutiTime1=13000Time2=80000ShowpastFibo = 0////IF (Time = Time1) OR ((Time > Time1) AND (Time[1] < Time1)) THENBar1 = barindexhh = highll = lowENDIFhh = max(hh,high)ll = min(ll,low)IF (Time = Time2) OR ((Time > Time2) AND (Time[1] < Time2)) THENBar2 = BarIndexENDIFIF Bar2 > Bar1 THEN// Punti di FibonacciORWidth = hh - llFibMid = (hh + ll) / 2FibExtUp2 = hh + ORWidth * (0.272)FibExtDown2 = ll - ORWidth * (0.272)///DrawRectangle(Bar1,hh,Bar2,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(Bar1,hh,Bar2,hh)coloured("red")style(line,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibMid,Bar2,FibMid)coloured("blue")style(dottedline,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)////IF ShowpastFibo = 1 THENdrawsegment(Bar1,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")////drawsegment(Bar1,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")////ELSE // SOLO GIORNO CORRENTEdrawsegment(Bar1,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")////drawsegment(Bar1,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")ENDIFBar2 = 0ENDIF///////returnGrazie
03/24/2025 at 4:41 PM #2452141234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950//////TF 30 minutiTime1=13000Time2=80000ShowpastFibo = 0////IF (openTime = Time1) OR ((openTime > Time1) AND (openTime[1] < Time1)) THENBar1 = barindexhh = highll = lowENDIFhh = max(hh,high)ll = min(ll,low)IF (openTime = Time2) OR ((openTime > Time2) AND (openTime[1] < Time2)) THENBar2 = BarIndex// Punti di FibonacciORWidth = hh - llFibMid = (hh + ll) / 2FibExtUp2 = hh + ORWidth * (0.272)FibExtDown2 = ll - ORWidth * (0.272)ENDIFIF ShowpastFibo = 1 and Bar2 > Bar1 THENDrawRectangle(Bar1,hh,Bar2,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(Bar1,hh,Bar2,hh)coloured("red")style(line,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibMid,Bar2,FibMid)coloured("blue")style(dottedline,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")////drawsegment(Bar1,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")Bar2 = 0elsif ShowpastFibo = 0 and islastbarupdate THENDrawRectangle(Bar1,hh,barindex,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(bar1,hh,barindex,hh)coloured("red")style(line,1)drawsegment(Bar1,ll,barindex,ll)coloured("green")style(line,1)drawsegment(Bar1,FibMid,barindex,FibMid)coloured("blue")style(dottedline,1)drawsegment(Bar1,ll,barindex,ll)coloured("green")style(line,1)drawsegment(Bar1,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")drawsegment(Bar1,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")endifreturn1 user thanked author for this post.
03/24/2025 at 5:50 PM #245222Con ShowpastFibo = 1 hh e ll sono corretti mentre con ShowpastFibo = 0 hh e ll sono errati. Non capisco perchè.
Mentre:
elsif ShowpastFibo = 0 and islastbarupdate THENDrawRectangle(Bar1,hh,barindex,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(bar1,hh,barindex,hh)coloured(“red”)style(line,1)…barindex va sostituito con Bar2Grazie03/25/2025 at 10:27 AM #245242Perfetto, ora sì. Il problema era che hh e ll venivano ricalcolati sempre, mentre vogliamo che lo facciano solo tra time1 e time2.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152//////TF 30 minutiTime1=13000Time2=80000ShowpastFibo = 0////IF (openTime = Time1) OR ((openTime > Time1) AND (openTime[1] < Time1)) THENBar1 = barindexhh = highll = lowelsif opentime>time1 and opentime<=time2 thenhh = max(hh,high)ll = min(ll,low)endifIF (openTime = Time2) OR ((openTime > Time2) AND (openTime[1] < Time2)) THENBar2 = BarIndex// Punti di FibonacciORWidth = hh - llFibMid = (hh + ll) / 2FibExtUp2 = hh + ORWidth * (0.272)FibExtDown2 = ll - ORWidth * (0.272)ENDIFIF ShowpastFibo = 1 and Bar2 > Bar1 THENDrawRectangle(Bar1,hh,Bar2,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(Bar1,hh,Bar2,hh)coloured("red")style(line,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibMid,Bar2,FibMid)coloured("blue")style(dottedline,1)drawsegment(Bar1,ll,Bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibExtDown2,barindex,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")////drawsegment(Bar1,FibExtUp2,barindex,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")Bar2 = 0elsif ShowpastFibo = 0 and bar2>bar1 and islastbarupdate THENDrawRectangle(Bar1,hh,bar2,ll) coloured(255,0,0,25) bordercolor(41,98,255,0) style(Line,2)drawsegment(bar1,hh,bar2,hh)coloured("red")style(line,1)drawsegment(Bar1,ll,bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibMid,bar2,FibMid)coloured("blue")style(dottedline,1)drawsegment(Bar1,ll,bar2,ll)coloured("green")style(line,1)drawsegment(Bar1,FibExtDown2,bar2,FibExtDown2)coloured("green")style(dottedline,1)DRAWTEXT("27.2% #FibExtDown2#",Bar1-6,FibExtDown2,SansSerif,Bold,8)coloured("green")drawsegment(Bar1,FibExtUp2,bar2,FibExtUp2)coloured("red")style(dottedline,1)DRAWTEXT("27.2% #FibExtUp2#",Bar1-6,FibExtUp2,SansSerif,Bold,8)coloured("red")endifreturn1 user thanked author for this post.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: