|
|
||||||||||||||||||
Tutti gli articoli | Tutte le notizie |
-
25-10-12, 23:51 #42
- Data Registrazione
- Jul 2007
- Messaggi
- 62
- Mentioned
- 0 Post(s)
- Quoted
- 1 Post(s)
- Potenza rep
- 3435990
KAGI FOL3
Codice:{****************************************************************************** * TS KAGI trading system che ricostruisce i livelli del grafico kagi il segnale è generato quando nel kagi la linea cambia colore ******************************************************************************} Input: valkagi(0.25); //valore indicatore Var: invl, invs; //livelli inversione kagi Var: deltas, deltal; //distanza dai livelli di inversione Var: newmax, newmin; //nuovi livelli estremi Var: segnaleprecedente, golong, goshort, goflat; //segnali{} Input: stoploss(0), //livello stop loss percentuale (facoltativo) trailprofit(0), //livello trailing profit percentuale (facoltativo) trailprofitandreverse(0.5), //livello trailing profit&reverse percentuale (facoltativo) takeprofit(0); //livello take profit percentuale (facoltativo) Var: pausa, controllopausa(1); //pausa: inserire 1 per il controllo degli orari, 0 per nessun controllo Input: inizio(0930); //ora di inizio trading, prima segnali inibiti Input: fine(1700); //ora di fine trading, dopo segnali inibiti Input: chiusura(1720); //ora di chiusura delle posizioni SetTickMin(5); RoundTickMin(true); golong = 0; //azzeramento contatori goshort = 0; goflat = 0; pausa = 0; { } if c>newmax then newmax=c; //aggiornamento estremi endif; if c<newmin then newmin=c; endif; deltas = newmax*((100-valkagi)/100); //calcolo livelli di inversione deltal = newmin*((100+valkagi)/100); if c < deltas and c[1] >= deltas then //aggiornamento per inversione short invs = newmax; newmin = c; endif; if c > deltal and c[1] <= deltal then //aggiornamento per inversione long invl = newmin; newmax = c; endif; { } if (c>invs) and (c[1]<=invs) then golong=1; //segnali endif; if (c<invl) and (c[1]>=invl) then goshort=1; endif; if stoploss<>0 then installstoploss (inperc, stoploss, "SL", CHECKCLOSE + EXITONLYIFCLOSEON); endif; if takeprofit<>0 then installtakeprofit (inperc, takeprofit, "TP"); endif; if trailprofit<>0 then installtrailingprofit (inperc, 0, trailprofit, "trail", CHECKCLOSE + EXITONLYIFCLOSEON); endif; if trailprofitandreverse<>0 then installtrailingprofitandreverse (inperc, 0, trailprofitandreverse, "trail", CHECKCLOSE + EXITONLYIFCLOSEON); endif; if (t<inizio or t>fine) or (t>1200 and t<1200) then if controllopausa = 1 then pausa=1; endif; endif; if t>=chiusura then goflat=1; golong=0; goshort=0; endif; SECTION_ENTERLONG: if golong=1 then exitshort (nextbar, atopen); if pausa=0 then enterlong (nextbar, atopen); segnaleprecedente=1; endif; endif; END_SECTION SECTION_EXITLONG: if goshort=1 then exitlong (nextbar, atopen); if pausa=0 then entershort (nextbar, atopen); segnaleprecedente=-1; endif; endif; if goflat=1 then exitlong (nextbar, atopen); endif; END_SECTION SECTION_ENTERSHORT: if goshort=1 then exitlong (nextbar, atopen); if pausa=0 then entershort (nextbar, atopen); segnaleprecedente=-1; endif; endif; END_SECTION SECTION_EXITSHORT: if golong=1 then exitshort (nextbar, atopen); if pausa=0 then enterlong (nextbar, atopen); segnaleprecedente=1; endif; endif; if goflat=1 then exitshort (nextbar, atopen); endif; END_SECTION plotchart (invs, 0, green, solid, 1); plotchart (invl, 0, red, solid, 1); plotchart (deltas, 0, green, dot, 1); plotchart (deltal, 0, red, dot, 1);
-
26-10-12, 18:24 #43
- Data Registrazione
- Jun 2008
- Messaggi
- 12,914
- Mentioned
- 2 Post(s)
- Quoted
- 1189 Post(s)
- Potenza rep
- 42949687
TS % Distanza open mese
Codice:var: percentom,indzona1; percentom=abs(((openm-c)/c)*100); PlotChart(openm,0,black,solid,3); PlotChart(highm,0,green,solid,3); PlotChart(lowm,0,red,solid,3); indzona1 = Createviewport(600); PlotChart(Percentom,indzona1,blue,solid,2); DrawText(NEWOGG,indzona1 , D,percentom , "% open mese",percentom , red, 20, 1+4,Alright);
-
29-10-12, 12:03 #44
- Data Registrazione
- Jun 2008
- Messaggi
- 12,914
- Mentioned
- 2 Post(s)
- Quoted
- 1189 Post(s)
- Potenza rep
- 42949687
TS operazione in Draw Down
Codice:var: NumTickDD(5); // numero di tick in draw down, da togliere al nostro segnale d'ingresso var: condizioneLong, condizioneShort, miosegnale; condizioneLong = C > C[1] and C > C[2] and C > C[3]; condizioneShort = C < C[1] and C < C[2] and C < C[3]; colorbar(gray); if PositionDir <> 1 then if condizioneLong then miosegnale = addtick(C, -NumTickDD); colorbar(green); // Esegue l'ordine LONG quando il prezzo viene raggiunto o è inferiore (<= prezzo) (limit). enterlong(nextbar, miosegnale, limit); endif; endif; if PositionDir <> -1 then if condizioneShort then miosegnale = addtick(C, NumTickDD); colorbar(red); // Esegue l'ordine SHORT quando il prezzo viene raggiunto o è superiore (>= prezzo) (limit). entershort(nextbar, miosegnale, limit); endif; endif;
-
01-11-12, 12:35 #45
- Data Registrazione
- Jun 2008
- Messaggi
- 12,914
- Mentioned
- 2 Post(s)
- Quoted
- 1189 Post(s)
- Potenza rep
- 42949687
TS media 3 Frame
Codice:var: media3frame,indzona1; media3frame=(((openm+highm+lowm)/3)+((openw+highw+loww)/3)+((opend+highd+lowd)/3))/3; indzona1 = Createviewport(700); PlotChart(media3frame,indzona1,red,solid,2); PlotChart(c,indzona1,black,solid,2);
-
01-11-12, 20:00 #46
- Data Registrazione
- Jan 2012
- Messaggi
- 99
- Mentioned
- 0 Post(s)
- Quoted
- 0 Post(s)
- Potenza rep
- 426433
Complimenti per l'iniziativa! Questo è sicuramente una delle discussioni più interessanti del forum!
-
04-11-12, 10:58 #47
- Data Registrazione
- Jun 2008
- Messaggi
- 12,914
- Mentioned
- 2 Post(s)
- Quoted
- 1189 Post(s)
- Potenza rep
- 42949687
TS Dave Landry
Codice:var: mioadx,miopdx,miondx,cond1,cond2,cond2a,cond3,cond4,cond5,cond6,cond7,cond8,cond9,cond10,cond11,cond12,cond13,cond14,pullbacklong,pullbackshort,indzona1,indzona2,indzona3,pista,mmpista,condplong,condpshort; mioadx=dmadx(c,10); miopdx=dmpdx(c,10); miondx=dmndx(c,10); pista=pistaciclica(c,25); mmpista=mov(pista,20,s); condplong=pista>mmpista; cond1=mioadx>25; cond2=miopdx>miondx; cond3=h<h[1] and h[1]<h[2]; cond4=h<h[1] and h[1]<h[2] and h[2]<h[3]; cond5=h<h[1] and h[1]<h[2] and h[2]<h[3] and h[3]<h[4]; cond6=h<h[1] and h[1]<h[2] and h[2]<h[3] and h[3]<h[4] and h[4]<h[5]; cond7=h<h[1] and h[1]<h[2] and h[2]<h[3] and h[3]<h[4] and h[4]<h[5] and h[5]<h[6]; cond8=h<h[1] and h[1]<h[2] and h[2]<h[3] and h[3]<h[4] and h[4]<h[5] and h[5]<h[6] and h[6]>h[7]; pullbacklong=cond1 and cond2 and condplong and (cond3 or cond4 or cond5 or cond6 or cond7 or cond8); condpshort=pista<mmpista; cond2a=miondx>miopdx; cond9=l>l[1] and l[1]>l[2]; cond10=l>l[1] and l[1]>l[2] and l[2]>l[3]; cond11=l>l[1] and l[1]>l[2] and l[2]>l[3] and l[3]>l[4]; cond12=l>l[1] and l[1]>l[2] and l[2]>l[3] and l[3]>l[4] and l[4]>l[5]; cond13=l>l[1] and l[1]>l[2] and l[2]>l[3] and l[3]>l[4] and l[4]>l[5] and l[5]>l[6]; cond14=l>l[1] and l[1]>l[2] and l[2]>l[3] and l[3]>l[4] and l[4]>l[5] and l[5]>l[6] and l[6]<l[7]; pullbackshort=cond1 and cond2a and condpshort and (cond9 or cond10 or cond11 or cond12 or cond13 or cond14); Indzona1=CreateViewport(100,0,true); PlotChart(pullbacklong,Indzona1,green,solid,1); Indzona2=CreateViewport(100,0,true); PlotChart(pullbackshort,Indzona2,red,solid,1); indzona3=createviewport(100,0,true); plotchart(pista,indzona3,green,solid,1); plotchart(mmpista,indzona3,red,solid,1);
-
05-11-12, 12:26 #48
- Data Registrazione
- Jun 2008
- Messaggi
- 12,914
- Mentioned
- 2 Post(s)
- Quoted
- 1189 Post(s)
- Potenza rep
- 42949687
TS windows Larry Connors
Codice:var:mioadx,miopdx,miondx,cond1,cond2,cond3,sma4,oops,r5,top,cond5,windows,indzona1; var:pista,mmpista,condplong,condpshort,indzona3; pista=pistaciclica(c,25); mmpista=mov(pista,20,s); condplong=pista>mmpista; condpshort=pista<mmpista; mioadx=dmadx(c,10); miopdx=dmpdx(c,10); miondx=dmndx(c,10); sma4=mov(c,4,s); cond1=mioadx>25; cond2=miopdx>miondx; cond3=h<sma4; oops=c>o; r5=r/100*10; top=h-r5; cond5=c>top; windows=cond1 and cond2 and cond3 and oops and cond5 and condplong; Indzona1=CreateViewport(300,0,true); PlotChart(windows,Indzona1,green,solid,1); Indzona3=CreateViewport(100,0,true); PlotChart(pista,Indzona3,green,solid,1); PlotChart(mmpista,Indzona3,red,solid,1);
-
06-11-12, 15:09 #49
- Data Registrazione
- May 2009
- Messaggi
- 632
- Mentioned
- 0 Post(s)
- Quoted
- 25 Post(s)
- Potenza rep
- 23801157
T R I X
Codice:var: media1,media2,media3,media4,media5,media6,media7,media8,parmedia(30),parmedia1(10),signtrix,trix,zona; //--- per enter / exit Var: k_pos(7), colore, stato, ingresso; var: Line0; var: myequity, mediaeq, condLong, condShort, myeqopclosed,zona_s,zona_d; // linea dello zero, per plottarla devo fare un vettore con tutti zeri Line0 = Constval(0); myeqopclosed = getReport(EQOPCLOSED); myequity = getReport(TOTNETPROFIT); // Estraggo il valore di equity attuale mediaeq = MOV(myequity, 30, S); // Faccio la media dell'equity media1 = mov(C,parmedia,s); media2 = mov (media1,parmedia,s); media3 = mov (media2,parmedia,s); media4 = mov (media3,parmedia,s); trix = (media4[0] - media4[1]) / media4[1]; media5 = mov(C,parmedia1,e); media6 = mov (media5,parmedia1,e); media7 = mov (media6,parmedia1,e); media8 = mov (media7,parmedia1,e); signtrix = (media8[0] - media8[1]) / media8[1]; if positiondir <> 1 then if signtrix > 0 and crossover (signtrix, trix) then enterlong (nextbar,atopen); colore = green; ingresso = C; DrawVLine(NEWOGG, 0, GetDate, green, 1, 0); DrawText(NEWOGG, 0, D, addtick(ingresso, - k_pos), " Ln", ingresso, colore, 11, 1+4, 1); endif; endif; If positiondir <> -1 then if signtrix < 0 and crossunder (signtrix, trix) then entershort (nextbar,atopen); colore = red; ingresso = C; DrawText(NEWOGG, 0, D, addtick(ingresso, k_pos), " Sh", ingresso, colore, 11, 1+4, 1); DrawVLine(NEWOGG, 0, GetDate, red, 1, 0); endif; endif; colorbar(colore); zona = CreateViewport(200, 0, true); plotchart(trix, zona, red, solid, 3); plotchart(signtrix, zona, green, solid, 3); //plotchart(media1, 0, red, solid, 3); DrawHLine (NEWOGG, zona, Line0, fuchsia, 2, 0); // linea dello zero // disegno l'equity e la sua media zona_s = CreateViewport(200, 0, true); plotchartNoZero(myequity, zona_s, green, solid, 2); plotchartNoZero(mediaeq, zona_s, red, solid, 2); plotchartNoZero(myeqopclosed, zona_s, black, solid, 3); zona_d = CreateViewport(100, 0, true); if positiondir = 1 then // DrawVLine(NEWOGG, 0, GetDate, green, 1, 0); PlotChart( 1, zona_d, green, istogramma, 2) ; endif; if positiondir = -1 then // DrawVLine(NEWOGG, 0, GetDate, red, 1, 0); PlotChart( -1, zona_d, red, istogramma, 2) ; endif;
-
07-11-12, 20:32 #50
- Data Registrazione
- Aug 2011
- Messaggi
- 2,042
- Mentioned
- 0 Post(s)
- Quoted
- 8 Post(s)
- Potenza rep
- 11136851
Codice:{***************************************** TS ideato da EOD semplice idea di partenza da migliorare. versione 1*************************************** } Var: miavar(0),MioMACD0,MioMACDSIGN1; MioMACD0 = MACD(C, 42, 168); MioMACDSIGN1 = MACDSIGN(C, 42, 168, 42); SECTION_ENTERLONG: if (MioMACD0 > MioMACDSIGN1) then EnterLong(NextBar, AtOpen); endif; END_SECTION SECTION_EXITLONG: if (MioMACD0 < MioMACDSIGN1) then EXITLONG(NextBar, AtOpen); endif; END_SECTION