Traduzione codice TW Zig Zag invincible
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Traduzione codice TW Zig Zag invincible
- This topic has 9 replies, 4 voices, and was last updated 2 weeks ago by
Msport71.
-
-
12/03/2024 at 11:53 AM #241033
Buongiorno,
chiedo cortese traduzione del seguente codice.
Grazie per l’aiuto.
https://www.tradingview.com/script/zdjIB3Bh-Zigzag3-Invincible3/
12/03/2024 at 3:44 PM #241036Ecco qui:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495//------------------------------------////PRC_ZigZag and SR//version = 0//03.12.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//------------------------------------//// Inputs//------------------------------------//prd=18showSR=1 //Show Support and Resistance//Boolean// 0 means false 1 means TrueshowLabels=1 //Boolean// 0 means false 1 means TrueshowZZ=1 //Boolean// 0 means false 1 means True//------------------------------------//// Calculate Pivot High and Low//------------------------------------//ph = high=highest[prd](high)pl = low=lowest[prd](low)//------------------------------------//// Calculate Direction//------------------------------------//if ph and pl=0 thendir=1elsif pl and ph=0 thendir=-1elsedir=direndifdirchanged=dir<>dir[1]//------------------------------------//// Calculate ZizZag levels and x//------------------------------------//if ph or pl thenif dirchanged thenif dir=1 then$zigzag[t+1]=highest[prd](high)$zigzagidx[t+1]=barindex$dir[t+1]=1t=t+1elsif dir=-1 then$zigzag[t+1]=lowest[prd](low)$zigzagidx[t+1]=barindex$dir[t+1]=-1t=t+1endifelseif dir=1 and highest[prd](high)> $zigzag[t] then$zigzag[t]=highest[prd](high)$zigzagidx[t]=barindexelsif dir=-1 and lowest[prd](low)< $zigzag[t] then$zigzag[t]=lowest[prd](low)$zigzagidx[t]=barindexendifendifendif//------------------------------------//// Draw ZigZag and Levels//------------------------------------//$zigzag[0]=undefined$zigzagidx[0]=undefinedif islastbarupdate thenif showZZ then//Last ZigZagdrawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],$zigzagidx[t],$zigzag[t])endifif showSR and $dir[t]=1 thendrawsegment($zigzagidx[t],$zigzag[t],barindex,$zigzag[t])style(dottedline,3)coloured("green")drawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],barindex,$zigzag[max(0,t-1)])style(dottedline,3)coloured("red")elsif showSR and $dir[t]=-1 thendrawsegment($zigzagidx[t],$zigzag[t],barindex,$zigzag[t])style(dottedline,3)coloured("red")drawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],barindex,$zigzag[max(0,t-1)])style(dottedline,3)coloured("green")endifif showLabels thendrawpoint($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],2)coloured("blue",100)drawpoint($zigzagidx[t],$zigzag[t],2)coloured("blue",100)endif//Draw all ZigZagfor i=t-1 downto 1 doif showZZ thendrawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[i])endifif showSR and $dir[i]=1 thendrawsegment($zigzagidx[i],$zigzag[i],$zigzagidx[i+1],$zigzag[i])style(dottedline,3)coloured("green")drawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[max(0,i-1)])style(dottedline,3)coloured("red")elsif showSR and $dir[i]=-1 thendrawsegment($zigzagidx[i],$zigzag[i],$zigzagidx[i+1],$zigzag[i])style(dottedline,3)coloured("red")drawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[max(0,i-1)])style(dottedline,3)coloured("green")endifif showLabels thendrawpoint($zigzagidx[i],$zigzag[i],2)coloured("blue",100)endifnextendif//------------------------------------//return12/03/2024 at 3:51 PM #24103812/04/2024 at 6:21 PM #24111012/04/2024 at 8:11 PM #241122Probabilmente non l’hai copiato tra gli indicatori.
Dalla foto mi sembra che tu l’abbia messo erroneamente tra le strategie.
1 user thanked author for this post.
12/05/2024 at 8:39 AM #241130Probabilmente non l’hai copiato tra gli indicatori.
Dalla foto mi sembra che tu l’abbia messo erroneamente tra le strategie.
Eh si proprio così errore mio.
Grazie e buona giornata
03/08/2025 at 10:13 AM #24476903/18/2025 at 2:50 PM #245013Eccolo:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108//------------------------------------////PRC_ZigZag and SR//version = 0//03.12.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//------------------------------------//// Inputs//------------------------------------//prd=18showSR=1 //Show Support and Resistance//Boolean// 0 means false 1 means TrueshowLabels=1 //Boolean// 0 means false 1 means TrueshowZZ=1 //Boolean// 0 means false 1 means TrueONCE PrevSwing = 0ONCE CurrSwing = 0//------------------------------------//// Calculate Pivot High and Low//------------------------------------//ph = high=highest[prd](high)pl = low=lowest[prd](low)//------------------------------------//// Calculate Direction//------------------------------------//if ph and pl=0 thendir=1elsif pl and ph=0 thendir=-1elsedir=direndifdirchanged=dir<>dir[1]//------------------------------------//// Calculate ZizZag levels and x//------------------------------------//if ph or pl thenif dirchanged thenif dir=1 then$zigzag[t+1]=highest[prd](high)$zigzagidx[t+1]=barindex$dir[t+1]=1t=t+1elsif dir=-1 then$zigzag[t+1]=lowest[prd](low)$zigzagidx[t+1]=barindex$dir[t+1]=-1t=t+1endifelseif dir=1 and highest[prd](high)> $zigzag[t] then$zigzag[t]=highest[prd](high)$zigzagidx[t]=barindexelsif dir=-1 and lowest[prd](low)< $zigzag[t] then$zigzag[t]=lowest[prd](low)$zigzagidx[t]=barindexendifendifendif//------------------------------------//// Draw ZigZag and Levels//------------------------------------//$zigzag[0]=undefined$zigzagidx[0]=undefinedif islastbarupdate thenif showZZ then//Last ZigZagdrawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],$zigzagidx[t],$zigzag[t])endifif showSR and $dir[t]=1 thendrawsegment($zigzagidx[t],$zigzag[t],barindex,$zigzag[t])style(dottedline,3)coloured("green")drawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],barindex,$zigzag[max(0,t-1)])style(dottedline,3)coloured("red")elsif showSR and $dir[t]=-1 thendrawsegment($zigzagidx[t],$zigzag[t],barindex,$zigzag[t])style(dottedline,3)coloured("red")drawsegment($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],barindex,$zigzag[max(0,t-1)])style(dottedline,3)coloured("green")endifif showLabels thendrawpoint($zigzagidx[max(0,t-1)],$zigzag[max(0,t-1)],2)coloured("blue",100)drawpoint($zigzagidx[t],$zigzag[t],2)coloured("blue",100)endif//Draw all ZigZagPrevSwing = 0CurrSwing = 0for i=t-1 downto 1 doif showZZ thendrawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[i])endifif showSR and $dir[i]=1 thendrawsegment($zigzagidx[i],$zigzag[i],$zigzagidx[i+1],$zigzag[i])style(dottedline,3)coloured("green")drawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[max(0,i-1)])style(dottedline,3)coloured("red")elsif showSR and $dir[i]=-1 thendrawsegment($zigzagidx[i],$zigzag[i],$zigzagidx[i+1],$zigzag[i])style(dottedline,3)coloured("red")drawsegment($zigzagidx[max(0,i-1)],$zigzag[max(0,i-1)],$zigzagidx[i],$zigzag[max(0,i-1)])style(dottedline,3)coloured("green")endifif showLabels thenPrevSwing = CurrSwingCurrSwing = $zigzag[i]Difference = CurrSwing - PrevSwingdrawpoint($zigzagidx[i],$zigzag[i],2)coloured("blue",100)Offset = (range*0.5)myPRICE = $zigzag[i] + OffsetIF Difference <= 0 THENmyPRICE = $zigzag[i] - OffsetENDIFdrawtext("#Difference#",$zigzagidx[i],myPRICE,dialog,bold,10) coloured("Fuchsia")endifnextendif//------------------------------------//returnPer variare la distanza del testo sostituisci alla riga 98 il valore 0.5 con un altro valore (0, 0.1, 1, 1.2, ecc…) a tuo piacimento.
Per variare la grandezza del testo sostituisci alla riga 103 il valore 10 con un altro valore (6, 11, 20, ecc…) a tuo piacimento.
1 user thanked author for this post.
03/18/2025 at 2:58 PM #245014Per cambiare i colori puoi usare i nomi (o i codici) indicati in questa tabella https://cloford.com/resources/colours/500col.htm.
1 user thanked author for this post.
03/18/2025 at 5:25 PM #245019grazie e mille, gentilissimo.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on