MAX e MIN vari TF
Forums › ProRealTime forum Italiano › Supporto ProBuilder › MAX e MIN vari TF
- This topic has 6 replies, 2 voices, and was last updated 11 months ago by Edisone.
Viewing 7 posts - 1 through 7 (of 7 total)
-
-
12/04/2023 at 11:11 AM #224799
Salve avrei bisogno di un aiuto per una modifica al codice.
Ho necessità di avere solo nel TF Daily anche il Min e Max della scorsa settimana
Grazie mille
maxemin12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455DEFPARAM DrawOnLastBarOnly = True// MAX e MINONCE Futuro = 10 //stampa per 2 barre futureONCE PrevHH = 0ONCE PrevLL = 0ONCE HH = 0ONCE LL = 0TF = GetTimeFrameIF TF >= 86400 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexELSIF IntraDayBarIndex = 0 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexENDIFHH = max(HH,high)LL = min(LL,low)DrawSegment(Barra-1,PrevHH,BarIndex + Futuro,PrevHH) coloured(0,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLL,BarIndex + Futuro,PrevLL) coloured(0,0,0,255) style(line,3)//(255,0,0,255)// SOLO SCRITTA SUL RISPETTIVO T.F.IF TF = 180 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 1800 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 86400 THEN //DAYDRAWTEXT("MAX D", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 604800 THENDRAWTEXT("MAX W", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN W", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 2592000 THENDRAWTEXT("MAX M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = (2592000*3) THENDRAWTEXT("MAX 3M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN 3M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFRETURN12/04/2023 at 7:19 PM #224851Eccolo:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273DEFPARAM DrawOnLastBarOnly = True// MAX e MINONCE Futuro = 10 //stampa per 2 barre futureONCE PrevHH = 0ONCE PrevLL = 0ONCE HH = 0ONCE LL = 0ONCE HHw = 0ONCE LLw = 0ONCE PrevHHw= 0ONCE PrevLLw= 0IF (OpenDayOfWeek = 1) AND (TF = 86400) THENPrevHHw = HHwPrevLLw = LLwHHw = highLLw = lowENDIFTF = GetTimeFrameIF TF >= 86400 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexELSIF IntraDayBarIndex = 0 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexENDIFHH = max(HH,high)LL = min(LL,low)DrawSegment(Barra-1,PrevHH,BarIndex + Futuro,PrevHH) coloured(0,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLL,BarIndex + Futuro,PrevLL) coloured(0,0,0,255) style(line,3)//(255,0,0,255)// SOLO SCRITTA SUL RISPETTIVO T.F.IF TF = 180 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 1800 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 86400 THEN //DAYHHw = max(HHw,high)LLw = min(LLw,low)DRAWTEXT("MAX D", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)//DrawSegment(Barra-1,PrevHHw,BarIndex + Futuro,PrevHHw) coloured(255,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLLw,BarIndex + Futuro,PrevLLw) coloured(0,0,255,255) style(line,3)//(255,0,0,255)DRAWTEXT(" MAX W prec", BarIndex + Futuro+2,PrevHHw,SansSerif,Standard,12) coloured(255,0,0,255)DRAWTEXT(" MIN W prec" , BarIndex + Futuro+2,PrevLLw,SansSerif,Standard,12) coloured(0,0,255,255)ENDIFIF TF = 604800 THENDRAWTEXT("MAX W", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN W", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 2592000 THENDRAWTEXT("MAX M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = (2592000*3) THENDRAWTEXT("MAX 3M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN 3M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFRETURN12/04/2023 at 9:52 PM #22485512/05/2023 at 5:18 PM #224898Mi sono accorto che nell’ultimo c’è un errore sul 30 minuti, ecco quello corretto:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485DEFPARAM DrawOnLastBarOnly = True// MAX e MINONCE Futuro = 10 //stampa per 2 barre futureONCE PrevHH = 0ONCE PrevLL = 0ONCE HH = 0ONCE LL = 0ONCE HHw = 0ONCE LLw = 0ONCE PrevHHw= 0ONCE PrevLLw= 0ONCE Wflag = 0IF (OpenDayOfWeek = 1) AND ((TF = 86400) OR ((TF = 1800) AND (Wflag = 0))) THENPrevHHw = HHwPrevLLw = LLwHHw = highLLw = lowWflag = 1ENDIFIF OpenDayOfWeek > 1 THENWflag = 0ENDIFTF = GetTimeFrameIF TF >= 86400 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexELSIF IntraDayBarIndex = 0 THENPrevHH = HHPrevLL = LLHH = highLL = lowBarra = BarIndexENDIFHH = max(HH,high)LL = min(LL,low)HHw = max(HHw,high)LLw = min(LLw,low)DrawSegment(Barra-1,PrevHH,BarIndex + Futuro,PrevHH) coloured(0,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLL,BarIndex + Futuro,PrevLL) coloured(0,0,0,255) style(line,3)//(255,0,0,255)// SOLO SCRITTA SUL RISPETTIVO T.F.IF TF = 180 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 1800 THENDRAWTEXT("MAX D", BarIndex + Futuro+3,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+3,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)//DrawSegment(Barra-1,PrevHHw,BarIndex + Futuro,PrevHHw) coloured(255,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLLw,BarIndex + Futuro,PrevLLw) coloured(0,0,255,255) style(line,3)//(255,0,0,255)DRAWTEXT(" MAX W prec", BarIndex + Futuro+2,PrevHHw,SansSerif,Standard,12) coloured(255,0,0,255)DRAWTEXT(" MIN W prec" , BarIndex + Futuro+2,PrevLLw,SansSerif,Standard,12) coloured(0,0,255,255)ENDIFIF TF = 86400 THEN //DAYHHw = max(HHw,high)LLw = min(LLw,low)DRAWTEXT("MAX D", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN D", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)//DrawSegment(Barra-1,PrevHHw,BarIndex + Futuro,PrevHHw) coloured(255,0,0,255) style(line,3)//(0,0,255,255)DrawSegment(Barra-1,PrevLLw,BarIndex + Futuro,PrevLLw) coloured(0,0,255,255) style(line,3)//(255,0,0,255)DRAWTEXT(" MAX W prec", BarIndex + Futuro+2,PrevHHw,SansSerif,Standard,12) coloured(255,0,0,255)DRAWTEXT(" MIN W prec" , BarIndex + Futuro+2,PrevLLw,SansSerif,Standard,12) coloured(0,0,255,255)ENDIFIF TF = 604800 THENDRAWTEXT("MAX W", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN W", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = 2592000 THENDRAWTEXT("MAX M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFIF TF = (2592000*3) THENDRAWTEXT("MAX 3M", BarIndex + Futuro+2,PrevHH,SansSerif,Standard,12) coloured(0,0,0,255)DRAWTEXT("MIN 3M", BarIndex + Futuro+2,PrevLL,SansSerif,Standard,12) coloured(0,0,0,255)ENDIFRETURN12/05/2023 at 5:37 PM #22489912/08/2023 at 10:56 AM #225045Per me va bene, come puoi vedere dalle foto allegate, una con evidenziato il Massimo precedente ed una con il Minimo precedente, sul Dax 30 minuti, i dati visualizzati combaciano con i dati della settimana precedente.
Se riscontri ancora degli errori fammi sapere su quale strumento, così faccio una verifica.
12/08/2023 at 7:03 PM #225065 -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
Find exclusive trading pro-tools on
Similar topics: