13/09/10

bettervolume con rsi

Nella versione con RSI avete anche la lettura contemporanea della forza presente sul mercato, questo tipo di RSI si adatta alla scala del volume automaticamente ma ho inserito i controlli per poterlo eventualmente regolare in altezza, è completamente configurabile:

Legenda variabili RSI con valori di default:

Oshift= 30 (è il periodo su cui si calcola la media di riferimento del volume, tale periodo riguarda solo il numero iniziale di barre del vostro grafico storico, cioè se scegliete 30 (default), si intendono le prime 30 barre, non le seguenti 30, percui se all'inizio del vostro storico il volume era particolarmente scarso basterà che aumentiate tale periodo.

Vshift= 5 (è il parametro che regola RSI in altezza sulla scala del volume

period=14 (periodo di calcolo per RSI)

RSIMinimo=20 (la soglia di ipervenduto)

RSIMassimo=80 (la soglia di ipercomprato)

applica a = chiusura (valore su cui si calcola RSI)

ed ecco i codici:

Versione Solo volumi:

/////////////////////////////////////////////
vv1=volume
vv2=range*volume
if range<>0 then
vv3=volume/range
endif
vv4=average[100](vv1)
if vv1=lowest[20](vv1) then
lowvol=vv1
else
lowvol=0
endif
if vv2=highest[20](vv2) then
climax=vv1
else
climax=0
endif
if vv3=highest[20](vv3) then
chum=vv1
else
chum=0
endif
if vv2=highest[20](vv2) and vv3=highest[20](vv3) then
chumclim=vv1
else
chumclim=0
endif
if vv3=lowest[20](vv3) then
lowchum=vv1
else
lowchum=0
endif
return vv1 coloured(0,204,204) as "volume",lowvol coloured(204,204,0) as "Low-V Low-R",climax coloured(255,0,0) as "climax High-V High-R",chum coloured(0,204,0) as "High-V Low-R",lowchum as "Low-V High-R",chumclim coloured(204,0,204) as "climax High-V Low-R",vv4 as "average"


//////////////////////////////////////////////////////////////////////

versione modificata con RSI

//////////////////////////////////////////////////////

REM Parametri: Oshift=30 Vshift=5 period=14 RSIMassimo=80 RSIMinimo=20

////////////////////////////////////////////////////
vv1=volume
vv2=range*volume
if range<>0 then
vv3=volume/range
endif
vv4=average[100](vv1)
if vv1=lowest[20](vv1) then
lowvol=vv1
else
lowvol=0
endif
if vv2=highest[20](vv2) then
climax=vv1
else
climax=0
endif
if vv3=highest[20](vv3) then
chum=vv1
else
chum=0
endif
if vv2=highest[20](vv2) and vv3=highest[20](vv3) then
chumclim=vv1
else
chumclim=0
endif
if vv3=lowest[20](vv3) then
lowchum=vv1
else
lowchum=0
endif

REM RSI

rialzo=MAX(0,Customclose-Customclose[1])
ribasso=MAX(0,Customclose[1]-Customclose)
mmRialzo=wilderaverage[period](rialzo)
mmRibasso=wilderaverage[period](ribasso)
RS=mmRialzo/mmRibasso
mioRSI=100-100/(1+RS)

avolume=average[Oshift](volume)

If Barindex
mioRSI2=undefined
else
avolume=avolume[1]
mioRSI2=((mioRSI/100)*Vshift)*avolume
endif

avRSI=average[period*2](mioRSI2)
mRSI=avolume*(Vshift/2)

mioMax=(RSIMassimo/100)
mioMin=(RSIMinimo/100)
RSImin=(avolume*Vshift)*mioMin
RSIMax=(avolume*Vshift)*mioMax




return vv1 coloured(0,204,204) as "volume",lowvol coloured(204,204,0) as "Low-V Low-R",climax coloured(255,0,0) as "climax High-V High-R",chum coloured(0,204,0) as "High-V Low-R",lowchum as "Low-V High-R",chumclim coloured(204,0,204) as "climax High-V Low-R",vv4 as "average", mioRSI2 as "RSI", avRSI as "Media RSI", RSImin as "Ipervenduto", mRSI as "RSI 50", RSIMax as "Ipercomprato"
Jolly Roger non è connesso   Rispondi citando

Nessun commento:

Posta un commento

www.finanza.com
info.gif (242 byte)