Filtro_direzionale

Ti piacerebbe fare trading a tempo pieno?

  • per niente

    Votes: 10 26,3%
  • ci penserei seriamente

    Votes: 13 34,2%
  • è il mio sogno

    Votes: 15 39,5%

  • Total voters
    38
Codice:
var:VolSpikel,Volspike2l,VolSpikes ,SPIKE_LOW, VolSpike2s,SPIKE_HIGHT,zona1,mioatr1,mioatr2;
var:MIN,MAX,bb,CC,zona1;
var:val1,val2,r(0),RR,RR1,RR2,RR3,RR4,RR6,RR5,RR7,mioatr3;
Var:Vol1,mioval, WW,mioatr1,mioatr2;    
Var:MioPatt0,MioPatt1;
VAR:miavar(0),MioRsi,MIN1,MAX1;
var:bb,CC,mioatr1,mioatr2;
var:VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread,LONC,CORT;
VAR: miavar(0),MioRsi,MIN1,MAX1;
var: bb,CC,zona1,mioatr1,mioatr2;
var: VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread;
Miomax = HHV(H,20);
Miomin = LLV(L,20);
VAL1 = Miomax-C;
VAL2 = C-Miomin;
mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,21,s);
miacondizione1 = (C-O)<(H-L);
miacondizione2 = (C-O)>(H-L);


//***********************************************************************************************************
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

//***********************************************************************************************************************************
// SEZIONE CONTROLLO SPIKE VOLUMI

VolP1=L<L[1] and L<L[2] AND C>C[1] AND C>O AND miacondizione1 = true AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];

VolP2=L>L[1] AND L<L[2] AND C>C[1] AND C>O AND miacondizione2 = true AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];
//************************************************************************************************************************************
if VolP1 or VolP2 then
SPIKE_LOW = 1;
colorbar(fuchsia);
else
SPIKE_LOW = 0;
endif;
//************************************************************************************************************************************
VolP3=H>H[1] AND miacondizione1 = true and H>H[2] and C<C[1] AND C<O AND V[1]>V[2] and V[1]>V[3] and V[1]>V[4] and V[1]>V[5] and V[1]>V[6] and V[1]>V[7];
VolP4=H<H[1] AND miacondizione2 = true and H>H[2] and C<C[1] AND C<O  AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6]and V[1]>V[7];

//************************************************************************************************************************************

if VolP3 or VolP4 then
SPIKE_HIGHT = -1 ;
colorbar(Yellow);
else
SPIKE_HIGHT = 0;
endif;
//***********************************************************************************************************************************

//********************************************************************************************************************************************

VolSpikel=Low<=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2l=Low>=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

IF VolSpikel OR VolSpike2l THEN
SPIKE_LOW=1;
ELSE
SPIKE_LOW=0;
ENDIF;

VolSpikes=High>High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2s=High<High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];


IF VolSpikes OR VolSpike2s THEN
SPIKE_HIGHT=-1 ;

ELSE
SPIKE_HIGHT=0;
ENDIF;
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

if L_Signal > S_Signal and Solo > Spread then
LONC = LONC+1;
CORT = 0;
else
CORT = CORT+1;
LONC = 0;
endif;



mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,50,s);
mioatr3 = atr(C,21);
 RR = (r[1]+r[2]);
 RR1 =(H-l)*V[1]/V*r;
 RR3 = LLV(L,10);
 RR4 = HHV(H,10);
 RR5 =HHV(C,10);
 RR7 =LLV(O,10);
 //*****************************************************************************
 if RR1[1] > 10 and C > C[1] and C[1]< C[2] then
   RR2 = rr1+50;
   else
   RR2 = 0;
 endif;
  if RR1[1] > 10 and C < C[1] and C[1] > C[2] then
  RR2 = RR1-50;
  else
  RR2 = 0;
  endif;
  if (H-C) > (C-L)and B = true and R > mioatr3*2  then
  RR6 = 100;
  else
  RR6 = 0;
  endif;
  if (H-C) <(C-L)and W = TRUE and B[1] = true and R > mioatr3*2 then
  RR7 = 100;
  else
  RR7 = 0;
  endif;
 // SEZIONI ENTRATE
if SPIKE_LOW = 1  and L_Signal > S_Signal[2]   then   // ENTRA SE SI VERIFICA LA CONDIZIONE DI PICCO DEI VOLUMI POSITIVA
 enterlong(nextbar,atopen);
 S_Signal = 0;
 endif;

if SPIKE_HIGHT = - 1 and S_Signal > L_Signal[2] then     // ENTRA SE SI VERIFICA LA CONDIZIONE DI VOLUMI NEGATIVA
entershort(nextbar,atopen);
L_Signal = 0;
endif;

if L_signal > S_signal[2] and L_Signal > 5 and LLL1 = 1  then
enterlong(nextbar,atopen);
S_signal = 0; // contatore short azzerato
endif;


if S_signal > L_signal[2] and S_Signal > 5 and SSS1 = 1  then
entershort (nextbar,atopen);
L_signal = 0; // contatore long azzerato
endif;

riguardo a questo ts mi è venuta un idea ...molto prbabilmente è una caxxata ...però la dico ugualmente .....
perche non limitare le entrate long o short che siano a determinati orari ???
mi sembra che faccia operazioni superfle nelle ore centrali della giornata ...che ne dite????
 
la domanda era riferita al filtrolong e filtroshort dove rimane una linea continua invece di variare


Ho guardato il tuo codice.
Filtrolong vale 1 se miomax>0, filtroshort vale 1 se miomin>0.

Ora, tralasciando le variazioni dovute ad ingressi che qui non son riportate, miomax sara sempre >0 essendo il max a 20 barre, cosi come mio min sara sempre >0, essendo il minimo a 20 barre (fatta eccezione le prime 20 barre).


Ciao, Damien.
 
Ultima modifica:
Ho guardato il tuo codice.
Filtrolong vale 1 se miomax>0, filtroshort vale 1 se miomin>0.

Ora, tralasciando le variazioni dovute ad ingressi che qui non son riportate, miomax sara sempre >0 essendo il max a 20 barre, cosi come mio min sara sempre >0, essendo il minimo a 20 barre (fatta eccezione le prime 20 barre).


Ciao, Damien.

Hai ragione, filtrolong e filtroshort lavorano solo se ci sono ingressi e uscite nel ts.
Grazie delle tue preziose consulenze.
 
è quello che avevo ipotizzato io nei post qui sopra ...magari limitando le entrate o le uscite in un determinato periodo di tempo
 
Ho inserito l'adx per filtrare un po le operazioni
e una formulina magica ( grazie ad un amico )di cui non conosco l'utilità ...ma so per certo che raddrizza un po l'equity e in piu stop loss e trailing profit

lo sto testando su fiat time frame 5 minuti

che ne dite ? si accettano suggerimenti
Codice:
var:VolSpikel,Volspike2l,VolSpikes ,SPIKE_LOW, VolSpike2s,SPIKE_HIGHT,zona1,mioatr1,mioatr2;
var:MIN,MAX,bb,CC,zona1;
var:val1,val2,r(0),RR,RR1,RR2,RR3,RR4,RR6,RR5,RR7,mioatr3;
Var:Vol1,mioval, WW,mioatr1,mioatr2;
Var:MioPatt0,MioPatt1;
VAR:miavar(0),MioRsi,MIN1,MAX1;
var:bb,CC,mioatr1,mioatr2;
var:VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread,LONC,CORT;
VAR: miavar(0),MioRsi,MIN1,MAX1;
var: bb,CC,zona1,mioatr1,mioatr2;
var: VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread;
var: dif,difp,dif1,difp1;
Var: pdx14,ndx14,mdx14,op1,op2,op3,op4,op5,mioosc,m1,zona1,zona2,zona3;

dif=(close[1]-open[2]);
difp=(dif/close[2]*100);
dif1=(open[2]-close[1]);
difp1=(dif1/open[2]*100);

pdx14=DMPDX(C,14);
ndx14=DMNDX(C,14);
mdx14=DMADX (C, 14);

Miomax = HHV(H,100);
Miomin = LLV(L,100);
VAL1 = Miomax-C;
VAL2 = C-Miomin;
mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,21,s);
miacondizione1 = (C-O)<(H-L);
miacondizione2 = (C-O)>(H-L);

installstoploss ( inperc,2) ;
installtrailingprofit ( inperc,1.5,0.3, " GAIN " );



//***********************************************************************
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

//************************************************************
// SEZIONE CONTROLLO SPIKE VOLUMI

VolP1=L<L[1] and L<L[2] AND C>C[1] AND C>O AND miacondizione1 = true
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];

VolP2=L>L[1] AND L<L[2] AND C>C[1] AND C>O AND miacondizione2 = true
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];
//***********************************************************************
if VolP1 or VolP2 then
SPIKE_LOW = 1;
colorbar(fuchsia);
else
SPIKE_LOW = 0;
endif;
//*************************************************************************
VolP3=H>H[1] AND miacondizione1 = true and H>H[2] and C<C[1] AND C<O
AND V[1]>V[2] and V[1]>V[3] and V[1]>V[4] and V[1]>V[5] and V[1]>V[6] and V[1]>V[7];
VolP4=H<H[1] AND miacondizione2 = true and H>H[2] and C<C[1] AND C<O
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6]and V[1]>V[7];

//***************************************************************************

if VolP3 or VolP4 then
SPIKE_HIGHT = -1 ;
colorbar(Yellow);
else
SPIKE_HIGHT = 0;
endif;
//**************************************************************************************

//***************************************************************************************************

VolSpikel=Low<=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open
AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2l=Low>=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open
AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

IF VolSpikel OR VolSpike2l THEN
SPIKE_LOW=1;
ELSE
SPIKE_LOW=0;
ENDIF;

VolSpikes=High>High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open
AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2s=High<High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open AND
(Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND
Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];


IF VolSpikes OR VolSpike2s THEN
SPIKE_HIGHT=-1 ;

ELSE
SPIKE_HIGHT=0;
ENDIF;
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

if L_Signal > S_Signal and Solo > Spread then
LONC = LONC+1;
CORT = 0;
else
CORT = CORT+1;
LONC = 0;
endif;



mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,50,s);
mioatr3 = atr(C,21);
RR = (r[1]+r[2]);
RR1 =(H-l)*V[1]/V*r;
RR3 = LLV(L,10);
RR4 = HHV(H,10);
RR5 =HHV(C,10);
RR7 =LLV(O,10);
//*****************************************************************************
if RR1[1] > 10 and C > C[1] and C[1]< C[2] then
RR2 = rr1+50;
else
RR2 = 0;
endif;
if RR1[1] > 10 and C < C[1] and C[1] > C[2] then
RR2 = RR1-50;
else
RR2 = 0;
endif;
if (H-C) > (C-L)and B = true and R > mioatr3*2 then
RR6 = 100;
else
RR6 = 0;
endif;
if (H-C) <(C-L)and W = TRUE and B[1] = true and R > mioatr3*2 then
RR7 = 100;
else
RR7 = 0;
endif;
// SEZIONI ENTRATE
if SPIKE_LOW = 1 and L_Signal > S_Signal[2] and difp>0.30 and pdx14>ndx14 and
mdx14>mdx14[1] then // ENTRA SE SI VERIFICA LA CONDIZIONE DI PICCO DEI VOLUMI POSITIVA
enterlong(nextbar,atopen);
S_Signal = 0;
endif;

if SPIKE_HIGHT = - 1 and S_Signal > L_Signal[2] and difp1>0.30 and pdx14<ndx14
and mdx14>mdx14[1] then // ENTRA SE SI VERIFICA LA CONDIZIONE DI VOLUMI NEGATIVA
entershort(nextbar,atopen);
L_Signal = 0;
endif;

if L_signal > S_signal[2] and L_Signal > 5 and LLL1 = 1 and difp>0.30 and pdx14>ndx14
and mdx14>mdx14[1] then
enterlong(nextbar,atopen);
S_signal = 0; // contatore short azzerato
endif;


if S_signal > L_signal[2] and S_Signal > 5 and SSS1 = 1 and difp1>0.30 and pdx14<ndx14
and mdx14>mdx14[1] then
entershort (nextbar,atopen);
L_signal = 0; // contatore long azzerato
endif;
 
Ultima modifica:
Ho inserito l'adx per filtrare un po le operazioni
e una formulina magica ( grazie ad un amico )di cui non conosco l'utilità ...ma so per certo che raddrizza un po l'equity e in piu stop loss e trailing profit

lo sto testando su fiat time frame 5 minuti

che ne dite ? si accettano suggerimenti
Codice:
var:VolSpikel,Volspike2l,VolSpikes ,SPIKE_LOW, VolSpike2s,SPIKE_HIGHT,zona1,mioatr1,mioatr2;
var:MIN,MAX,bb,CC,zona1;
var:val1,val2,r(0),RR,RR1,RR2,RR3,RR4,RR6,RR5,RR7,mioatr3;
Var:Vol1,mioval, WW,mioatr1,mioatr2;
Var:MioPatt0,MioPatt1;
VAR:miavar(0),MioRsi,MIN1,MAX1;
var:bb,CC,mioatr1,mioatr2;
var:VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread,LONC,CORT;
VAR: miavar(0),MioRsi,MIN1,MAX1;
var: bb,CC,zona1,mioatr1,mioatr2;
var: VolP1,VolP2,VolP3 ,SPIKE_LOW, VolP4,SPIKE_HIGHT,mioatr1,mioatr2,miacondizione1,Miacondizione2;
var: L_signal,S_signal,VAL1,VAL2,indzona1,indzona2,miomax,miomin,mioR,RR1,RR2,LLL1,SSS1;
var: solo,spread;
var: dif,difp,dif1,difp1;
Var: pdx14,ndx14,mdx14,op1,op2,op3,op4,op5,mioosc,m1,zona1,zona2,zona3;

dif=(close[1]-open[2]);
difp=(dif/close[2]*100);
dif1=(open[2]-close[1]);
difp1=(dif1/open[2]*100);

pdx14=DMPDX(C,14);
ndx14=DMNDX(C,14);
mdx14=DMADX (C, 14);

Miomax = HHV(H,100);
Miomin = LLV(L,100);
VAL1 = Miomax-C;
VAL2 = C-Miomin;
mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,21,s);
miacondizione1 = (C-O)<(H-L);
miacondizione2 = (C-O)>(H-L);

installstoploss ( inperc,2) ;
installtrailingprofit ( inperc,1.5,0.3, " GAIN " );



//***********************************************************************
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

//************************************************************
// SEZIONE CONTROLLO SPIKE VOLUMI

VolP1=L<L[1] and L<L[2] AND C>C[1] AND C>O AND miacondizione1 = true
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];

VolP2=L>L[1] AND L<L[2] AND C>C[1] AND C>O AND miacondizione2 = true
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6] and V[1]>V[7];
//***********************************************************************
if VolP1 or VolP2 then
SPIKE_LOW = 1;
colorbar(fuchsia);
else
SPIKE_LOW = 0;
endif;
//*************************************************************************
VolP3=H>H[1] AND miacondizione1 = true and H>H[2] and C<C[1] AND C<O
AND V[1]>V[2] and V[1]>V[3] and V[1]>V[4] and V[1]>V[5] and V[1]>V[6] and V[1]>V[7];
VolP4=H<H[1] AND miacondizione2 = true and H>H[2] and C<C[1] AND C<O
AND V[1]>V[2] AND V[1]>V[3] AND V[1]>V[4] AND V[1]>V[5] AND V[1]>V[6]and V[1]>V[7];

//***************************************************************************

if VolP3 or VolP4 then
SPIKE_HIGHT = -1 ;
colorbar(Yellow);
else
SPIKE_HIGHT = 0;
endif;
//**************************************************************************************

//***************************************************************************************************

VolSpikel=Low<=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open
AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2l=Low>=Low[1] AND Low<Low[2] AND Close>Close[1] AND Close>=Open
AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

IF VolSpikel OR VolSpike2l THEN
SPIKE_LOW=1;
ELSE
SPIKE_LOW=0;
ENDIF;

VolSpikes=High>High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open
AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3]
AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];

VolSpike2s=High<High[1] AND High>High[2] AND Close<=Close[1] AND Close<=Open AND
(Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND
Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6] and V[1]>V[7];


IF VolSpikes OR VolSpike2s THEN
SPIKE_HIGHT=-1 ;

ELSE
SPIKE_HIGHT=0;
ENDIF;
if C >= O and (C-O)<(R) then
LLL1 = 1;
else
LLL1 = 0;
endif;

if C <= O and (O-C)<(R) then
SSS1 = 1;
else
SSS1 = 0;
endif;

if LLL1 > SSS1 then
solo = solo+1;
spread = 0;
endif;

if SSS1 > LLL1 then
spread = spread+1;
solo = 0;
endif;

if VAL1 < VAL2 then
L_signal = L_signal+1;
S_signal = 0;
else
S_signal = S_signal+1;
L_signal = 0;
endif;

if L_Signal > S_Signal and Solo > Spread then
LONC = LONC+1;
CORT = 0;
else
CORT = CORT+1;
LONC = 0;
endif;



mioatr1 = rsi(C,14,s);
mioatr2 = rsi(C,50,s);
mioatr3 = atr(C,21);
RR = (r[1]+r[2]);
RR1 =(H-l)*V[1]/V*r;
RR3 = LLV(L,10);
RR4 = HHV(H,10);
RR5 =HHV(C,10);
RR7 =LLV(O,10);
//*****************************************************************************
if RR1[1] > 10 and C > C[1] and C[1]< C[2] then
RR2 = rr1+50;
else
RR2 = 0;
endif;
if RR1[1] > 10 and C < C[1] and C[1] > C[2] then
RR2 = RR1-50;
else
RR2 = 0;
endif;
if (H-C) > (C-L)and B = true and R > mioatr3*2 then
RR6 = 100;
else
RR6 = 0;
endif;
if (H-C) <(C-L)and W = TRUE and B[1] = true and R > mioatr3*2 then
RR7 = 100;
else
RR7 = 0;
endif;
// SEZIONI ENTRATE
if SPIKE_LOW = 1 and L_Signal > S_Signal[2] and difp>0.30 and pdx14>ndx14 and
mdx14>mdx14[1] then // ENTRA SE SI VERIFICA LA CONDIZIONE DI PICCO DEI VOLUMI POSITIVA
enterlong(nextbar,atopen);
S_Signal = 0;
endif;

if SPIKE_HIGHT = - 1 and S_Signal > L_Signal[2] and difp1>0.30 and pdx14<ndx14
and mdx14>mdx14[1] then // ENTRA SE SI VERIFICA LA CONDIZIONE DI VOLUMI NEGATIVA
entershort(nextbar,atopen);
L_Signal = 0;
endif;

if L_signal > S_signal[2] and L_Signal > 5 and LLL1 = 1 and difp>0.30 and pdx14>ndx14
and mdx14>mdx14[1] then
enterlong(nextbar,atopen);
S_signal = 0; // contatore short azzerato
endif;


if S_signal > L_signal[2] and S_Signal > 5 and SSS1 = 1 and difp1>0.30 and pdx14<ndx14
and mdx14>mdx14[1] then
entershort (nextbar,atopen);
L_signal = 0; // contatore long azzerato
endif;

Ottimo lavoro di copiatura ... :nnoo:
Per fortuna credo che sia necessario capire di cosa si sta parlando, almeno un minimo ...
 

Users who are viewing this thread

Back
Alto