 |
|
28-03-2011, 22:36
|
#11 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
Indicator: @ndyTrend Indicator
[code]
input: Vola1 (2.2), Vola2(21);
Var: HClose(-99999), LClose(99999), Var1(0), Var2, TRAILINGSTOP;
Var1 = Op(constval(Vola1), stddev(C, Vola2), Mul);
HClose = IIF(C > HClose, C, HClose);
LClose = IIF(C < LClose, C, LClose);
If (Var2 = 0) and (CurrentBar <= 1) then
Var2 = HClose - Var1;
endif;
If (C < Var2) then
Var2 = LClose + Var1;
HClose = C;
Endif;
If (C > Var2) then
Var2 = HClose - Var1;
LClose = C;
Endif;
If (CurrentBar > 1) Then
TRAILINGSTOP = Var2[1];
endif;
PlotChart(TRAILINGSTOP, 0, lime, solid, 2);[/code]
|
|
|
| Avviso pubblicitario - i seguenti Banner Pubblicitari permettono al sito di offrirvi il consueto, alto standard qualitativo. |
| |
|
28-03-2011, 23:32
|
#12 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
pivot point
[code]Var:dayH,dayL,med,sup,inf,dayO,previousH,previousL ,previousC,prova,
cambiatogiorno,miopen,miomax,miomin,R1,R1mid,R2,R2 mid,R3,R3mid,PP,S1,
S1mid,S2,S2mid,S3,S3mid,R4,S4,R4mid,S4mid,indperio do,numper,ggini,
primavolta(-1),lin1,lin2,lin3,lin4,lin5,lin6,lin7,lin8,lin9,li n10,zona1;
previousH=EOD.H[1];
previousL=EOD.L[1];
previousC=EOD.C[1];
cambiatogiorno=getvalues(days,1,prova,prova,prova, prova);
dayH=EOD.H;
dayL=EOD.L;
med=(dayH+dayL)*0.5;
sup=(dayH+dayL)*0.528;
inf=(dayH+dayL)*0.472;
dayO=EOD.O;
PP=(previousH+previousC+previousL)/3;
R1=(2*PP)-previousL;
S1=(2*PP)-previousH;
R1mid=(R1+PP)/2;
S1mid=(S1+PP)/2;
R2=PP+(previousH-previousL);
S2=PP-(previousH-previousL);
R2mid=(R2+R1)/2;
S2mid=(S2+S1)/2;
R3=PP+(previousH-previousL)*2;
S3=PP-(previousH-previousL)*2;
R3mid=(R2+R3)/2;
S3mid=(S2+S3)/2;
R4= PP+(previousH-previousL)*3;
S4=PP-(previousH-previousL)*3;
R4mid= (R3+R4)/2;
S4mid= (S3+S4)/2;
if cambiatogiorno then
lin1=CREATEOGG;
lin2=CREATEOGG;
lin3=CREATEOGG;
lin4=CREATEOGG;
lin5=CREATEOGG;
lin6=CREATEOGG;
lin7=CREATEOGG;
lin8=CREATEOGG;
indperiodo=0;
ggini=getdate;
primavolta=false;
endif;
indperiodo=indperiodo+1;
numper=indperiodo;
lin1=drawhlineper(lin1,0,ggini,pp,numper,green,2,d ot,showval,"pp");
lin2=drawhlineper(lin2,0,ggini,r1,numper,red,2,dot ,showval,"R1");
lin3=drawhlineper(lin3,0,ggini,s1,numper,aqua,2,do t,showval,"S1");
lin4=drawhlineper(lin4,0,ggini,r2,numper,black,2,d ot,showval,"R2");
lin5=drawhlineper(lin5,0,ggini,s2,numper,black,2,d ot,showval,"S2");
lin6=drawhlineper(lin6,0,ggini,r3,numper,blue,2,do t,showval,"R3");
lin7=drawhlineper(lin7,0,ggini,s3,numper,yellow,2, dot,showval,"S3");
//lin8=drawhlineper(lin8,0,ggini,inf,numper,yellow,2 ,dot,showval,"inf");[/code]
Ultima modifica di 100pezzi : 31-03-2011 alle ore 21:32.
|
|
|
31-03-2011, 21:23
|
#13 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
BP e BPW
[code]
Var:newday1(false), mioopen(0), miomin(0), miomax(0), mioclose(0),BP(0);
Var:newday(false),giorno,azzera(0),sOpen ,sLow,sHigh,sClose,BPW(0),colore;
newday1=GetValues(days,1,mioopen,miomin, miomax,mioclose);
if newday=true then
BP=(miomax+miomin+mioclose)/3;endif;
newday=GetValues(weeks,1,sOpen,sLow,sHigh,sClose);
giorno=dayofweek;
azzera=iif(giorno<giorno[1],1,0);
if azzera=1 then BPW=(SHigh+SLow+SClose)/3;endif;
if c > bp and c>bpw then
colore= green;endif;
if c < bp and c<bpw then
colore= red;endif;
if c>bp and c<bpw then
colore=gray;endif;
if c<bp and c>bpw then
colore=gray;
endif;
if c>BP then colorbar(colore); else colorbar(colore); endif;
plotchart(BPW,0,black,solid,2);
PlotChart(BP, 0,red, solid, 3); [/code]
Ultima modifica di 100pezzi : 31-03-2011 alle ore 21:24.
|
|
|
31-03-2011, 22:01
|
#14 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
TRACCIA RETTA
[code]{************************************************* *****************************
TRACCIA RETTA by HELL75
************************************************** ****************************}
Var:Massimo,Minimo,contaMassimo,contaMinimo,minimo Rel,massimoRel,zona2;
input: Periodo(14);
//variabili per disegnare linee
Var: DataPunto1,DataPunto2,DataPunto3,
Punto1(1),Punto2(0),Punt3(2),
countPunto1(-1),countPunto2(-1),countPunto3(-1),
ValPunto1,ValPunto2,ValPunto3;
massimoRel= HHV(H, Periodo);
minimoRel= LLV(L, Periodo);
IF isfirstbarbegin then
Massimo=H;
Minimo=L;
ENDIF;
IF Massimo>massimoREL THEN
Massimo=H;
contaMassimo=0;
else
contaMassimo=contaMassimo+1;
ENDIF;
IF Minimo<minimoRel THEN
Minimo=L;
contaMinimo=0;
else
contaMinimo=contaMinimo+1;
ENDIF;
//Traccia linee
if massimoRel=massimoRel[1] and Punto1=0 and countPunto2>6 then // countPunto2>6 da modificare con formula calcolo CICLOPERIODO puntuale
ValPunto1=H[1];
DataPunto1 = GetDate;
DrawLine (CREATEOGG, 0, DataPunto2, ValPunto2,DataPunto1,ValPunto1 , red, 2, 0, EXTENDED);
Punto1=1;
Punto2=0;
countPunto1=-1;
endif;
if massimoRel=massimoRel[1] and Punto2=0 and countPunto1>6 then // countPunto1>6 da modificare con formula calcolo CICLOPERIODO puntuale
ValPunto2=H[1];
DataPunto2 = GetDate;
DrawLine (CREATEOGG, 0, DataPunto1, ValPunto1,DataPunto2,ValPunto2 , yellow, 2, 0, EXTENDED); //, EXTENDED
Punto1=0;
Punto2=1;
countPunto2=-1;
endif;
if Punto1=1 then countPunto1=countPunto1+1; else countPunto1=0; endif;
if Punto2=1 then countPunto2=countPunto2+1; else countPunto2=0; endif;
PlotChart(massimoRel,0,yellow,solid,1);
plotChart(minimoRel,0,red,solid,1);
zona2=CreateViewport(200,true,true);
plotChart(countPunto1,zona2,yellow,solid,1);
plotChart(countPunto2,zona2,red,solid,1);[/code]
Ultima modifica di 100pezzi : 31-03-2011 alle ore 22:02.
|
|
|
31-03-2011, 22:09
|
#15 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
TSV - TIME SEGMENTED VOLUME
[code]{************************************************* *****************************
* TSV - TIME SEGMENTED VOLUME
* REGOLE:
*
* ANALISI BREVE TERMINE INPUT DA 9 A 12
* ANALISI DI MEDIO TERMINE INPUT DA 18 A 25
* ANALISI DI LUNGO TERMINE INPUT DA 35 A 45
*
************************************************** ****************************}
Var: TSV(0), VPOS(0), VNEG(0), VPOSS(0), VNEGG(0), ZONA1;
INPUT: PERIODI(12);
//TSV = Sum ((IIF(C > Ref(C,1),V*(C-Ref(C,1)),0), IIF (C < Ref(C,1),-V*(C-Ref(C,1)),0),18);
IF C > C[1] THEN
VPOS = V * (C - Ref(C,1));
ELSE
VPOS = 0;
ENDIF;
IF C < C[1] THEN
VNEG = -V * (C - Ref(C,1));
ELSE
VNEG = 0;
ENDIF;
VPOSS=SUM(VPOS,PERIODI);
VNEGG=SUM(VNEG,PERIODI);
IF CURRENTBAR>PERIODI THEN
zona1=CreateViewport(200,true,true);
PlotChart(VPOSS,zona1,LIME,solid,2);
PlotChart(VNEGG,zona1,red,solid,2);ENDIF;[/code]
Ultima modifica di 100pezzi : 31-03-2011 alle ore 22:10.
|
|
|
31-03-2011, 22:16
|
#16 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
ER A 10 PERIODI
[code]
// calcolo di ER su 10 periodi
Var: idx(0),numiniz(1),numfine(9);
Var: direction(0), vola(0), ER(0), n, appo,zona1;
if CurrentBar > 10 then
direction = OP(C, REF(C, 10), sub);
vola = Valore_Assoluto (OP(C, REF(C, 1), sub));
beginfor(idx,numiniz,numfine);
n = idx+1;
appo = Valore_Assoluto (OP(REF(C, idx), REF(C, n), sub));
vola = OP(vola, appo, add);
endfor;
ER = OP(direction, vola, divis);
elseif CurrentBar <= 10 then
ER = 0;
endif;
zona1=CreateViewport(350,true,true);
PlotChart(ER,zona1,red,solid,1);[/code]
|
|
|
31-03-2011, 23:28
|
#17 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
XVOL
[code]
Var: xvol(0),bn(0),massim(0),minim(0),counter (0),indzona1(0), indzona2(0),indzona3(0);
if xvol < minim then
minim = xvol;
endif;
if xvol > massim then
massim = xvol ;
endif;
if c >c[1] then
xvol=xvol+v;
bn=1;
endif;
if c < c[1] then
xvol=xvol-v;
bn=2;
endif;
if c=c[1] and bn=1 then
xvol=xvol+v;
endif;
if c=c[1] and bn=2 then
xvol=xvol-v;
endif;
PlotChart(xvol, Indzona1, red, solid, 1);
PlotChart(minim, Indzona1, black, solid, 1);
PlotChart(massim, Indzona1, black, solid, 1); [/code]
|
|
|
01-04-2011, 09:12
|
#18 (permalink)
|
|
Utente Senior
Data registrazione: Mar 2008
Località: abruzzo
Messaggi: 242
|
Fol_oscillatore
[code]Var: mioci,MioRSI, MioRSI1, STOrsi, maxR, minR,sogliaEnter,sogliaExit,zona1;
mioci=mov(c,3,a);
mioRSI = RSI(mioci, 9, s);
mioRSI1 = mov(mioRSI, 7, s);
maxR = HHV(mioRSI1, 9);
minR = LLV(mioRSI1, 9);
StoRSI = OP(mov(op(OP(mioRSI1, minR, sub), OP(maxR, minR, sub), divis), 3, E),
constval(100), mul);
sogliaenter=20;
sogliaexit=80;
zona1 = createviewport(200, true, true);
plotchart(stoRSI, zona1, blue, solid, 2);
plotchart(sogliaEnter,zona1, green, solid, 1);
plotchart(sogliaExit,zona1, red, solid, 1);[/code]
|
|
|
01-04-2011, 20:39
|
#19 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
grazie Gilato x il tuo contributo . L'indicatore è molto interessante 
|
|
|
02-04-2011, 22:10
|
#20 (permalink)
|
|
Utente Senior
Data registrazione: Feb 2011
Messaggi: 113
|
FOR&FREE
[code]
Var: miomov1,miomax1,miomin1,AA,BB;
Var: for,free,sommaMMAA,mmaa,sommaMMBB,mmbb,indzona1;
miomax1 = HHV(H,30);
miomin1 = LLv(L,30);
miomov1 = MOV(C,3,s);
AA = ((miomax1 - C)+ (miomov1)*miomax1)/C;
BB = ((miomin1 - C)+ (miomov1)*miomin1)/C;
sommaMMAA = sum(aa,9);
MMAA=sommaMMAA/9;
sommaMMBB=sum(bb,9);
MMBB = sommaMMBB/9;
for = (AA-MMBB)/(MMAA-BB);
free = (MMAA-BB)/(AA-MMBB);
IF CURRENTBAR>1 THEN
indzona1 = createviewport(200, true, true);
PlotChart(for,indzona1, black,solid,1);
PlotChart(free,indzona1, red, solid,1);
plotchart( AA,0,red,solid,1);
plotchart( BB,0,blue,solid,1);
plotchart(MMAA,0,black,solid,2);
plotchart(MMBB,0,black,solid,2);ENDIF;[/code]
|
|
|
|