solospread
Forumer storico
Ciclone ha sentito da qualche parte che c'è un trader che prende il prezzo di chiusura delle 9,10-10,10-11,10 ecc.................. e lo usa come pivot. Ecco che abbiamo messo in codice per VT questa teoria. Il livello di pivot ha valenza per 1 ora dopodichè entra il nuovo pivot dell'ora successiva. si và long al suo superamento e short viceversa. Dal livello ho messo 30 pt di distanza sia in sù che in giù per evitare continue entrate ed uscite. Il frame da utilizzare è 1minuto ed il contratto è il vecchio FIB o MINI. Posto il listato:
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
Codice:
Var: miavar(0), Miacondizione1,Miacondizione2,miacondizione3,Miacondizione4,Miacondizione5,Miacondizione6;
Var: Miacondizione7,Miacondizione8, Miacondizione9,Miacondizione10, Miacondizione11,Miacondizione12, Miacondizione13,Miacondizione14;
Var: Miacondizione15,Miacondizione16,Miacondizione17,miacondizione18;
if T = 0910 then
Miacondizione1 = C+30;endif;
if T = 0910 then
Miacondizione2 = C-30; endif;
if T = 1010 then
Miacondizione3 = C+30;endif;
if T = 1010 then
Miacondizione4 = C-30; endif;
if T = 1110 then
Miacondizione5 = C+30;endif;
if T = 1110 then
Miacondizione6 = C-30; endif;
if T =1210 then
Miacondizione7 = C+30;endif;
if T = 1210 then
Miacondizione8 = C-30; endif;
if T = 1310 then
Miacondizione9 = C+30;endif;
if T = 1310 then
Miacondizione10 = C-30; endif;
if T = 1410 then
Miacondizione11 = C+30;endif;
if T = 1410 then
Miacondizione12 = C-30; endif;
if T =1510 then
Miacondizione13 = C+30;endif;
if T = 1510 then
Miacondizione14 = C-30; endif;
if T = 1610 then
Miacondizione15 = C+30;endif;
if T = 1610 then
Miacondizione16 = C-30; endif;
if T = 1710 then
Miacondizione17 = C+30;endif;
if T = 1710 then
Miacondizione18 = C-30; endif;
////////////////////////////////////////////////////////////////////////////////
if (CompareTime(09, 10, 0) > 0) and (CompareTime(10,09, 0) < 0) then
if C > Miacondizione1 then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(09, 10, 0) > 0) and (CompareTime(10,09, 0) < 0) then
if C < Miacondizione2 then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(10, 10, 0) > 0) and (CompareTime(11,09, 0) < 0) then
if C > Miacondizione3 then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(10, 10, 0) > 0) and (CompareTime(11, 09, 0) < 0) then
if C < Miacondizione4 then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(11, 10, 0) > 0) and (CompareTime(12,09, 0) < 0) then
if (C > Miacondizione5) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(11, 10, 0) > 0) and (CompareTime(12, 09, 0) < 0) then
if (C < Miacondizione6) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(12, 10, 0) > 0) and (CompareTime(13,09, 0) < 0) then
if (C > Miacondizione7) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(12, 10, 0) > 0) and (CompareTime(13, 09, 0) < 0) then
if (C < Miacondizione8) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(13, 10, 0) > 0) and (CompareTime(14,09, 0) < 0) then
if (C > Miacondizione9) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(13, 10, 0) > 0) and (CompareTime(14, 09, 0) < 0) then
if (C < Miacondizione10) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(14, 10, 0) > 0) and (CompareTime(15,09, 0) < 0) then
if (C > Miacondizione11) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(14, 10, 0) > 0) and (CompareTime(15, 09, 0) < 0) then
if (C < Miacondizione12) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(15, 10, 0) > 0) and (CompareTime(16,09, 0) < 0) then
if (C > Miacondizione13) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(15, 10, 0) > 0) and (CompareTime(16, 09, 0) < 0) then
if (C < Miacondizione14) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(16, 10, 0) > 0) and (CompareTime(17,09, 0) < 0) then
if (C > Miacondizione15) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(16, 10, 0) > 0) and (CompareTime(17, 09, 0) < 0) then
if (C < Miacondizione16) then
EnterShort(NextBar, AtOpen);
endif;endif;
if (CompareTime(17, 10, 0) > 0) and (CompareTime(17,30, 0) < 0) then
if (C > Miacondizione17) then
EnterLong(NextBar, AtOpen);
endif; endif;
if (CompareTime(17, 10, 0) > 0) and (CompareTime(17, 30, 0) < 0) then
if (C < Miacondizione18) then
EnterShort(NextBar, AtOpen);
endif;endif;
installtrailingprofit (inperc,1.4,0.2,trailing);
//installstoploss(inperc,0.5) ;
//installtakeprofit(inperc,2);/CODE]