Visto che con PRT la gestione dei colori è terribile, l'indicatore non si compone di un unico listato ma piuttosto è un "accrocchio" di vari componenti in modo da poter rendere l'effetto finale. I pezzi vanno caricati seguendi un ordine preciso, per prima cosa si aggiunge in una nuova finestra "WOODIES CCI", poi andando sulle propietà di questa finestra si aggiungono in sequenza "WOODIES SIDEWINDER", "WOODIES CHOP ZONE", "WOODIES CCI LINE ZERO".
Dopo ogni codice riporto come devono essere settate le proprietà di tutte le componenti.
1)
//////////////////////////////////////////////////////////////////////////
/////////////////////////////WOODIE CCI///////////////////////
///////////////////////////////////////////////////////////////////////////
WCCI=CCI[14](close)
HCCI=WCCI
TCCI=CCI[6](close)
if (wcci>0 and wcci[1]>0 and wcci[2]>0 and wcci[3]>0 and wcci[4]>0 and wcci[5]<0) or (wcci<0 and wcci[1]<0 and wcci[2]<0 and wcci[3]<0 and wcci[4]<0 and wcci[5]>0) then
hcci=0
HYCCI=WCCI
else
HYCCI=0
endif
if (wcci>0 and wcci[1]>0 and wcci[2]>0 and wcci[3]>0 and wcci[4]>0 and wcci[5]>0) or (wcci<0 and wcci[1]<0 and wcci[2]<0 and wcci[3]<0 and wcci[4]<0 and wcci[5]<0) then
hcci=0
HTCCI=WCCI
else
HTCCI=0
endif
return HCCI, HYCCI, HTCCI, WCCI, TCCI
//////////////////////////////////////////FINE//////////////////////////////////////////////
HCCI->istogramma - grigio
HYCCI->istogramma - giallo
WCCI->istogramma - positivo verde - negativo rosso
WCCI->linea spssa
TCCI-> linea media
2)
//////////////////////////////////////////////////////////////////////////
/////////////WOODIE CCI SIDEWINDER///////////////
///////////////////////////////////////////////////////////////////////////
//rem angolo ema
coeffema=34/(highest[34](high)-lowest[34](low))*lowest[34](low)
ema=ExponentialAverage[34](close)
hema=(ema-ema[1])/typicalprice*coeffema
angema=Atan(hema)
//rem angolo lsma
coefflsma=25/(highest[25](high)-lowest[25](low))*lowest[25](low)
lsma=EndPointAverage[25](close)
hlsma=(lsma-lsma[1])/typicalprice*coefflsma
anglsma=ATAN(hlsma)
var1=0
var2=0
var3=0
var4=0
var5=0
var6=0
if ((angema<10 and angema>0 and angema+anglsma=>10) or (anglsma<10 and anglsma=>0 and anglsma+angema=>10)) then
var1=200
var4=-200
else
if ((angema>-10 and angema<=0 and angema+anglsma<=-10) or ( anglsma>-10 and anglsma<=0 and anglsma+angema<=-10)) then
var1=200
var4=-200
else
if (angema<=-10 and anglsma<=-10) then
var2=200
var5=-200
else
if (angema=>10 and anglsma=>10) then
var2=200
var5=-200
else
var3=200
var6=-200
endif
endif
endif
endif
return var1, var2, var3, var4, var5, var6
////////////////////////////FINE////////////////////////////////////////
var1 e var4 -> punto spesso - giallo
var2 e var5 -> punto spesso - verde
var3 e var6 -> punto spesso - rosso
3)
//////////////////////////////////////////////////////////////////////////
///////////////WOODIE CCI CHOP ZONE///////////////
///////////////////////////////////////////////////////////////////////////
//p=34
IF close>ExponentialAverage[p](close) THEN
RLONG=1
LONG=100
LONG2=-100
IF open<ExponentialAverage[p](close) and close>ExponentialAverage[p](close) THEN
RLONG=-1
ENDIF
ELSE
LONG=0
LONG2=0
ENDIF
IF close<ExponentialAverage[p](close) THEN
SHORT=100
SHORT2=-100
RSHORT=1
IF open>ExponentialAverage[p](close) and close<ExponentialAverage[p](close) THEN
RSHORT=-1
ENDIF
ELSE
SHORT=0
SHORT2=0
ENDIF
RETURN LONG COLOURED BY RLONG, LONG2 COLOURED BY RLONG, SHORT COLOURED BY RSHORT, SHORT2 COLOURED BY RSHORT
////////////////////////////FINE////////////////////////////////////////
I primi due -> punto spesso - rialzo verde - ribasso blu
i restanti due -> punto spesso - rialzo rosso - ribbasso viola
4)
//////////////////////////////////////////////////////////////////////////
/////////////////WOODIE CCI LINE ZERO///////////////
///////////////////////////////////////////////////////////////////////////
LSMA=EndPointAverage[24](close)
if close=>LSMA then
zero=1
else
zero=-1
endif
return 0 coloured by zero
////////////////////////////FINE////////////////////////////////////////
zero -> punto spesso - rialzo nero - ribasso azzurro
Tutto sto' sbattimeto per avere un risultato tipo questo
Tutto il codice è stato scritto in base a quello riportato qui su questo 3d
Come LSMA ho deciso di usare la media end point (cosi veniva suggerito da diversi siti)
Il Codice vuole essere una bozza da migliorare ma questo compito la lascio a chi magari usa questa tecnica e che magari può fare dei confronti con i soft approvati.
Ciao
P.S. il chop zone l'ho aggiunto al volo non so nenanche se funziona bene
.....
--------------------------------------------------------------
11-10-2009
- modificato il woodies sidewinder in base al codice per metatrader postato
qui
- eliminato il woodies line 200 in quanto le nuove modifiche lo rendono non necessario
---------------------------------------------------------------