pan you certainly have alot of buy and sell conditions!
your code of
Cross(MDI(14),PDI(14))
OR
Ref(Cross(MDI(14),PDI(14)),-1))
could be written as
Alert(Cross(MDI(14),PDI(14)),2)
What you are really doing is combining 17 separate systems into one system
Here is an example of your buy1 signal and sell 1 signal
Entry:=Cross(Mov(C,3,E),Mov(C,9,E)) AND
(ADX(14) >= 25 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,9,E),Mov(C,3,E)) AND
(ADX(14) >= 25 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
here is your Buy2 sell 2 signals
Entry:=Cross(Mov(C,3,E),Mov(C,18,E)) AND
(ADX(14) >= 25 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,18,E),Mov(C,3,E)) AND
(ADX(14) >= 25 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Here is your Buy 3 Sell 3 signals
Entry:=Cross(Mov(C,9,E),Mov(C,18,E)) AND
(ADX(14) >= 25 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,18,E),Mov(C,9,E)) AND
(ADX(14) >= 25 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
Buy 4 Sell 4 Signals
Entry:=Cross(Mov(C,3,E),Mov(C,50,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,50,E),Mov(C,3,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy5 sell 5 Signals
Entry:=Cross(Mov(C,9,E),Mov(C,50,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,50,E),Mov(C,9,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy6 sell 6 Signals
Entry:=Cross(Mov(C,18,E),Mov(C,50,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,50,E),Mov(C,18,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy7 Sell 7 Signals
Entry:=Cross(Mov(C,3,E),Mov(C,100,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,100,E),Mov(C,3,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy8 sell 8 Signals
Entry:=Cross(Mov(C,9,E),Mov(C,100,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,100,E),Mov(C,9,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy9 sell9 signals
Entry:=Cross(Mov(C,18,E),Mov(C,100,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,100,E),Mov(C,18,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy10 sell10 signals
Entry:=Cross(Mov(C,50,E),Mov(C,100,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,100,E),Mov(C,50,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy11Sell 11 Signals
Entry:=Cross(Mov(C,3,E),Mov(C,200,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,200,E),Mov(C,3,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy12 sell 12 Signals
Entry:=Cross(Mov(C,9,E),Mov(C,200,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,200,E),Mov(C,9,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy13 sell13 signals
Entry:=Cross(Mov(C,18,E),Mov(C,200,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,200,E),Mov(C,18,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy14 sell14 signals
Entry:=Cross(Mov(C,50,E),Mov(C,200,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,200,E),Mov(C,50,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short
Buy15 sell15 signals
Entry:=Cross(Mov(C,100,E),Mov(C,200,E))
AND
(ADX(14) >= 20 OR Alert(Cross(PDI(14),MDI(14)),2));
exit:= Cross(Mov(C,200,E),Mov(C,100,E)) AND
(ADX(14) >= 20 OR Alert(Cross(MDI(14),PDI(14)),2));
init:=Cum(IsDefined(entry+exit))=1;
bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
Long-Short