利用亂數作為回測優化,最大的特徵就是無意義的組合總是居多數,但是又需要保留分批回測的最佳結果,以作為模組間的再次比較,所以需要利用Multicharts的文字輸出功能,將關注的績效指標利用字串方式逐次輸出,欄位之間利用分號來給予區隔,在大規模回測後,可將績效輸出的文字檔,利用Excel 匯入外部資料方式,進行排序,以便快訊尋找到最佳對應的模組
我的模組績效輸出欄位有 :
1. K棒時間長度、2.亂數種子、3.交易次數、4.累積淨利、5.MDD、6.連續最大虧損次數、7.Profit/MDD的比值、8.勝率、9.凱利值、10.資金成長比例、11.本金翻倍所需交易次數、12.本金翻倍所需時間、13.最近連續20筆交易淨利,位居過去連續20筆交易淨利的百分位數、14.連續交易20筆仍為虧損的機率、15.最近連續50筆交易淨利,位居過去連續50筆交易淨利的百分位數、16.連續交易50筆仍為虧損的機率、17.年度獲利、18.各月份獲利
當然,如何閱讀與挑選Multicharts的績效報表,這牽涉到交易員的主觀判斷與風險的承受能力,下回我再繼續分享我的績效指標挑選的邏輯
程式碼分享如下 :
// Preference Table ***
{Print.Output.List}
Vars:PreferenceName(“"),PreferenceSet(“"),yyNP(“"),yyName(“"),mmNP(“"),mmName(“");
Vars:LongProfit(0),ShortProfit(0),NP(0),MDD(0),NumMaxLost(0),NMRatio(0),Win(0),ET(0),PF(0);
Vars:AvgP(0),AvgL(0),KR(0),WLR(0),Gvalue(0),Dnum(0),DTime(0),EndDate(0);
Vars:Sum20Value(0),Sum20Count(0),Sum20Rank100(“"),Sum50Value(0),Sum50Count(0);
Vars:Sum50Rank100(“"),ZeroSum20Count(0),ZeroSum50Count(0),ZeroSum20Rank100(“"),ZeroSum50Rank100(“");
Arrays:TradeSeries[39999](0),TradeEnDate[39999](0),Sum20[39999](0),Sum50[39999](0);
//Year Month Preference
Arrays:YearProfit[25](0),MonthProfit_2021[12](0),MonthProfit_2020[12](0),MonthProfit_2019[12](0),MonthProfit_2018[12](0),MonthProfit_2017[12](0),MonthProfit_2016[12](0);
Arrays:MonthProfit_2015[12](0),MonthProfit_2014[12](0),MonthProfit_2013[12](0),MonthProfit_2012[12](0),MonthProfit_2011[12](0),MonthProfit_2010[12](0);
If LastBarOnChart then begin
For ii = 1 to TN begin //
TradeSeries[ii]=PositionProfit(ii);
TradeEnDate[ii]=EntryDate(ii);
If MarketPosition(ii)=1 then LongProfit=LongProfit+TradeSeries[ii];
If MarketPosition(ii)=-1 then ShortProfit=ShortProfit+TradeSeries[ii];
//If SignalName=1 then ExText=Text(ExText,EntryName(ii),"+",ExitName(ii),"|");
End; //
For ii = 1 to TN begin
Switch Year(TradeEnDate[ii])+1900 begin
Case 2021 : YearProfit[1]=YearProfit[1]+TradeSeries[ii];
Case 2020 : YearProfit[2]=YearProfit[2]+TradeSeries[ii];
Case 2019 : YearProfit[3]=YearProfit[3]+TradeSeries[ii];
Case 2018 : YearProfit[4]=YearProfit[4]+TradeSeries[ii];
Case 2017 : YearProfit[5]=YearProfit[5]+TradeSeries[ii];
Case 2016 : YearProfit[6]=YearProfit[6]+TradeSeries[ii];
Case 2015 : YearProfit[7]=YearProfit[7]+TradeSeries[ii];
Case 2014 : YearProfit[8]=YearProfit[8]+TradeSeries[ii];
End;
End;
yyNP=Text(YearProfit[1]:0:0,";",YearProfit[2]:0:0,";",YearProfit[3]:0:0,";",YearProfit[4]:0:0,";",YearProfit[5]:0:0,";",YearProfit[6]:0:0,";",YearProfit[7]:0:0,";",YearProfit[8]:0:0,";");
yyName=Text(“2021″,"2020″,";","2019″,";","2018″,";","2017″,";","2016″,";","2015″,";","2014″);
For ii = 1 to TN begin
Switch Text(Year(TradeEnDate[ii]):0:0,"/",Month(TradeEnDate[ii]):0:0) begin
Case “121/12″ : MonthProfit_2021[1]=MonthProfit_2021[1]+TradeSeries[ii];
Case “121/11″ : MonthProfit_2021[2]=MonthProfit_2021[2]+TradeSeries[ii];
Case “121/10″ : MonthProfit_2021[3]=MonthProfit_2021[3]+TradeSeries[ii];
Case “121/9″ : MonthProfit_2021[4]=MonthProfit_2021[4]+TradeSeries[ii];
Case “121/8″ : MonthProfit_2021[5]=MonthProfit_2021[5]+TradeSeries[ii];
Case “121/7″ : MonthProfit_2021[6]=MonthProfit_2021[6]+TradeSeries[ii];
Case “121/6″ : MonthProfit_2021[7]=MonthProfit_2021[7]+TradeSeries[ii];
Case “121/5″ : MonthProfit_2021[8]=MonthProfit_2021[8]+TradeSeries[ii];
Case “121/4″ : MonthProfit_2021[9]=MonthProfit_2021[9]+TradeSeries[ii];
Case “121/3″ : MonthProfit_2021[10]=MonthProfit_2021[10]+TradeSeries[ii];
Case “121/2″ : MonthProfit_2021[11]=MonthProfit_2021[11]+TradeSeries[ii];
Case “121/1″ : MonthProfit_2021[12]=MonthProfit_2021[12]+TradeSeries[ii];
Case “120/12″ : MonthProfit_2020[1]=MonthProfit_2020[1]+TradeSeries[ii];
Case “120/11″ : MonthProfit_2020[2]=MonthProfit_2020[2]+TradeSeries[ii];
Case “120/10″ : MonthProfit_2020[3]=MonthProfit_2020[3]+TradeSeries[ii];
Case “120/9″ : MonthProfit_2020[4]=MonthProfit_2020[4]+TradeSeries[ii];
Case “120/8″ : MonthProfit_2020[5]=MonthProfit_2020[5]+TradeSeries[ii];
Case “120/7″ : MonthProfit_2020[6]=MonthProfit_2020[6]+TradeSeries[ii];
Case “120/6″ : MonthProfit_2020[7]=MonthProfit_2020[7]+TradeSeries[ii];
Case “120/5″ : MonthProfit_2020[8]=MonthProfit_2020[8]+TradeSeries[ii];
Case “120/4″ : MonthProfit_2020[9]=MonthProfit_2020[9]+TradeSeries[ii];
Case “120/3″ : MonthProfit_2020[10]=MonthProfit_2020[10]+TradeSeries[ii];
Case “120/2″ : MonthProfit_2020[11]=MonthProfit_2020[11]+TradeSeries[ii];
Case “120/1″ : MonthProfit_2020[12]=MonthProfit_2020[12]+TradeSeries[ii];
Case “119/12″ : MonthProfit_2019[1]=MonthProfit_2019[1]+TradeSeries[ii];
Case “119/11″ : MonthProfit_2019[2]=MonthProfit_2019[2]+TradeSeries[ii];
Case “119/10″ : MonthProfit_2019[3]=MonthProfit_2019[3]+TradeSeries[ii];
Case “119/9″ : MonthProfit_2019[4]=MonthProfit_2019[4]+TradeSeries[ii];
Case “119/8″ : MonthProfit_2019[5]=MonthProfit_2019[5]+TradeSeries[ii];
Case “119/7″ : MonthProfit_2019[6]=MonthProfit_2019[6]+TradeSeries[ii];
Case “119/6″ : MonthProfit_2019[7]=MonthProfit_2019[7]+TradeSeries[ii];
Case “119/5″ : MonthProfit_2019[8]=MonthProfit_2019[8]+TradeSeries[ii];
Case “119/4″ : MonthProfit_2019[9]=MonthProfit_2019[9]+TradeSeries[ii];
Case “119/3″ : MonthProfit_2019[10]=MonthProfit_2019[10]+TradeSeries[ii];
Case “119/2″ : MonthProfit_2019[11]=MonthProfit_2019[11]+TradeSeries[ii];
Case “119/1″ : MonthProfit_2019[12]=MonthProfit_2019[12]+TradeSeries[ii];
Case “118/12″ : MonthProfit_2018[1]=MonthProfit_2018[1]+TradeSeries[ii];
Case “118/11″ : MonthProfit_2018[2]=MonthProfit_2018[2]+TradeSeries[ii];
Case “118/10″ : MonthProfit_2018[3]=MonthProfit_2018[3]+TradeSeries[ii];
Case “118/9″ : MonthProfit_2018[4]=MonthProfit_2018[4]+TradeSeries[ii];
Case “118/8″ : MonthProfit_2018[5]=MonthProfit_2018[5]+TradeSeries[ii];
Case “118/7″ : MonthProfit_2018[6]=MonthProfit_2018[6]+TradeSeries[ii];
Case “118/6″ : MonthProfit_2018[7]=MonthProfit_2018[7]+TradeSeries[ii];
Case “118/5″ : MonthProfit_2018[8]=MonthProfit_2018[8]+TradeSeries[ii];
Case “118/4″ : MonthProfit_2018[9]=MonthProfit_2018[9]+TradeSeries[ii];
Case “118/3″ : MonthProfit_2018[10]=MonthProfit_2018[10]+TradeSeries[ii];
Case “118/2″ : MonthProfit_2018[11]=MonthProfit_2018[11]+TradeSeries[ii];
Case “118/1″ : MonthProfit_2018[12]=MonthProfit_2018[12]+TradeSeries[ii];
Case “117/12″ : MonthProfit_2017[1]=MonthProfit_2017[1]+TradeSeries[ii];
Case “117/11″ : MonthProfit_2017[2]=MonthProfit_2017[2]+TradeSeries[ii];
Case “117/10″ : MonthProfit_2017[3]=MonthProfit_2017[3]+TradeSeries[ii];
Case “117/9″ : MonthProfit_2017[4]=MonthProfit_2017[4]+TradeSeries[ii];
Case “117/8″ : MonthProfit_2017[5]=MonthProfit_2017[5]+TradeSeries[ii];
Case “117/7″ : MonthProfit_2017[6]=MonthProfit_2017[6]+TradeSeries[ii];
Case “117/6″ : MonthProfit_2017[7]=MonthProfit_2017[7]+TradeSeries[ii];
Case “117/5″ : MonthProfit_2017[8]=MonthProfit_2017[8]+TradeSeries[ii];
Case “117/4″ : MonthProfit_2017[9]=MonthProfit_2017[9]+TradeSeries[ii];
Case “117/3″ : MonthProfit_2017[10]=MonthProfit_2017[10]+TradeSeries[ii];
Case “117/2″ : MonthProfit_2017[11]=MonthProfit_2017[11]+TradeSeries[ii];
Case “117/1″ : MonthProfit_2017[12]=MonthProfit_2017[12]+TradeSeries[ii];
Case “116/12″ : MonthProfit_2016[1]=MonthProfit_2016[1]+TradeSeries[ii];
Case “116/11″ : MonthProfit_2016[2]=MonthProfit_2016[2]+TradeSeries[ii];
Case “116/10″ : MonthProfit_2016[3]=MonthProfit_2016[3]+TradeSeries[ii];
Case “116/9″ : MonthProfit_2016[4]=MonthProfit_2016[4]+TradeSeries[ii];
Case “116/8″ : MonthProfit_2016[5]=MonthProfit_2016[5]+TradeSeries[ii];
Case “116/7″ : MonthProfit_2016[6]=MonthProfit_2016[6]+TradeSeries[ii];
Case “116/6″ : MonthProfit_2016[7]=MonthProfit_2016[7]+TradeSeries[ii];
Case “116/5″ : MonthProfit_2016[8]=MonthProfit_2016[8]+TradeSeries[ii];
Case “116/4″ : MonthProfit_2016[9]=MonthProfit_2016[9]+TradeSeries[ii];
Case “116/3″ : MonthProfit_2016[10]=MonthProfit_2016[10]+TradeSeries[ii];
Case “116/2″ : MonthProfit_2016[11]=MonthProfit_2016[11]+TradeSeries[ii];
Case “116/1″ : MonthProfit_2016[12]=MonthProfit_2016[12]+TradeSeries[ii];
Case “115/12″ : MonthProfit_2015[1]=MonthProfit_2015[1]+TradeSeries[ii];
Case “115/11″ : MonthProfit_2015[2]=MonthProfit_2015[2]+TradeSeries[ii];
Case “115/10″ : MonthProfit_2015[3]=MonthProfit_2015[3]+TradeSeries[ii];
Case “115/9″ : MonthProfit_2015[4]=MonthProfit_2015[4]+TradeSeries[ii];
Case “115/8″ : MonthProfit_2015[5]=MonthProfit_2015[5]+TradeSeries[ii];
Case “115/7″ : MonthProfit_2015[6]=MonthProfit_2015[6]+TradeSeries[ii];
Case “115/6″ : MonthProfit_2015[7]=MonthProfit_2015[7]+TradeSeries[ii];
Case “115/5″ : MonthProfit_2015[8]=MonthProfit_2015[8]+TradeSeries[ii];
Case “115/4″ : MonthProfit_2015[9]=MonthProfit_2015[9]+TradeSeries[ii];
Case “115/3″ : MonthProfit_2015[10]=MonthProfit_2015[10]+TradeSeries[ii];
Case “115/2″ : MonthProfit_2015[11]=MonthProfit_2015[11]+TradeSeries[ii];
Case “115/1″ : MonthProfit_2015[12]=MonthProfit_2015[12]+TradeSeries[ii];
Case “114/12″ : MonthProfit_2014[1]=MonthProfit_2014[1]+TradeSeries[ii];
Case “114/11″ : MonthProfit_2014[2]=MonthProfit_2014[2]+TradeSeries[ii];
Case “114/10″ : MonthProfit_2014[3]=MonthProfit_2014[3]+TradeSeries[ii];
Case “114/9″ : MonthProfit_2014[4]=MonthProfit_2014[4]+TradeSeries[ii];
Case “114/8″ : MonthProfit_2014[5]=MonthProfit_2014[5]+TradeSeries[ii];
Case “114/7″ : MonthProfit_2014[6]=MonthProfit_2014[6]+TradeSeries[ii];
Case “114/6″ : MonthProfit_2014[7]=MonthProfit_2014[7]+TradeSeries[ii];
Case “114/5″ : MonthProfit_2014[8]=MonthProfit_2014[8]+TradeSeries[ii];
Case “114/4″ : MonthProfit_2014[9]=MonthProfit_2014[9]+TradeSeries[ii];
Case “114/3″ : MonthProfit_2014[10]=MonthProfit_2014[10]+TradeSeries[ii];
Case “114/2″ : MonthProfit_2014[11]=MonthProfit_2014[11]+TradeSeries[ii];
Case “114/1″ : MonthProfit_2014[12]=MonthProfit_2014[12]+TradeSeries[ii];
End;
End;
mmNP=Text(MonthProfit_2021[12]:0:0,";",MonthProfit_2021[11]:0:0,";",MonthProfit_2021[10]:0:0,";",MonthProfit_2021[9]:0:0,";",MonthProfit_2021[8]:0:0,";",MonthProfit_2021[7]:0:0,";",MonthProfit_2021[6]:0:0,";",MonthProfit_2021[5]:0:0,";",MonthProfit_2021[4]:0:0,";",MonthProfit_2021[3]:0:0,";",MonthProfit_2021[2]:0:0,";",MonthProfit_2021[1]:0:0,";",MonthProfit_2020[12]:0:0,";",MonthProfit_2020[11]:0:0,";",MonthProfit_2020[10]:0:0,";",MonthProfit_2020[9]:0:0,";",MonthProfit_2020[8]:0:0,";",MonthProfit_2020[7]:0:0,";",MonthProfit_2020[6]:0:0,";",MonthProfit_2020[5]:0:0,";",MonthProfit_2020[4]:0:0,";",MonthProfit_2020[3]:0:0,";",MonthProfit_2020[2]:0:0,";",MonthProfit_2020[1]:0:0,";",MonthProfit_2019[12]:0:0,";",MonthProfit_2019[11]:0:0,";",MonthProfit_2019[10]:0:0,";",MonthProfit_2019[9]:0:0,";",MonthProfit_2019[8]:0:0,";",MonthProfit_2019[7]:0:0,";",MonthProfit_2019[6]:0:0,";",MonthProfit_2019[5]:0:0,";",MonthProfit_2019[4]:0:0,";",MonthProfit_2019[3]:0:0,";",MonthProfit_2019[2]:0:0,";",MonthProfit_2019[1]:0:0,";",MonthProfit_2018[12]:0:0,";",MonthProfit_2018[11]:0:0,";",MonthProfit_2018[10]:0:0,";",MonthProfit_2018[9]:0:0,";",MonthProfit_2018[8]:0:0,";",MonthProfit_2018[7]:0:0,";",MonthProfit_2018[6]:0:0,";",MonthProfit_2018[5]:0:0,";",MonthProfit_2018[4]:0:0,";",MonthProfit_2018[3]:0:0,";",MonthProfit_2018[2]:0:0,";",MonthProfit_2018[1]:0:0,";",MonthProfit_2017[12]:0:0,";",MonthProfit_2017[11]:0:0,";",MonthProfit_2017[10]:0:0,";",MonthProfit_2017[9]:0:0,";",MonthProfit_2017[8]:0:0,";",MonthProfit_2017[7]:0:0,";",MonthProfit_2017[6]:0:0,";",MonthProfit_2017[5]:0:0,";",MonthProfit_2017[4]:0:0,";",MonthProfit_2017[3]:0:0,";",MonthProfit_2017[2]:0:0,";",MonthProfit_2017[1]:0:0,";",MonthProfit_2016[12]:0:0,";",MonthProfit_2016[11]:0:0,";",MonthProfit_2016[10]:0:0,";",MonthProfit_2016[9]:0:0,";",MonthProfit_2016[8]:0:0,";",MonthProfit_2016[7]:0:0,";",MonthProfit_2016[6]:0:0,";",MonthProfit_2016[5]:0:0,";",MonthProfit_2016[4]:0:0,";",MonthProfit_2016[3]:0:0,";",MonthProfit_2016[2]:0:0,";",MonthProfit_2016[1]:0:0,";",MonthProfit_2015[12]:0:0,";",MonthProfit_2015[11]:0:0,";",MonthProfit_2015[10]:0:0,";",MonthProfit_2015[9]:0:0,";",MonthProfit_2015[8]:0:0,";",MonthProfit_2015[7]:0:0,";",MonthProfit_2015[6]:0:0,";",MonthProfit_2015[5]:0:0,";",MonthProfit_2015[4]:0:0,";",MonthProfit_2015[3]:0:0,";",MonthProfit_2015[2]:0:0,";",MonthProfit_2015[1]:0:0,";",MonthProfit_2014[12]:0:0,";",MonthProfit_2014[11]:0:0,";",MonthProfit_2014[10]:0:0,";",MonthProfit_2014[9]:0:0,";",MonthProfit_2014[8]:0:0,";",MonthProfit_2014[7]:0:0,";",MonthProfit_2014[6]:0:0,";",MonthProfit_2014[5]:0:0,";",MonthProfit_2014[4]:0:0,";",MonthProfit_2014[3]:0:0,";",MonthProfit_2014[2]:0:0,";",MonthProfit_2014[1]:0:0,";");
mmName=Text(“2021/12″,";","2021/11″,";","2021/10″,";","2021/9″,";","2021/8″,";","2021/7″,";","2021/6″,";"“2021/5″,";","2021/4″,";","2021/3″,";","2021/2″,";","2021/1″,";"
“2020/12″,";","2020/11″,";","2020/10″,";","2020/9″,";","2020/8″,";","2020/7″,";","2020/6″,";",“2020/5″,";","2020/4″,";","2020/3″,";","2020/2″,";","2020/1″,";",“2019/12″,";","2019/11″,";","2019/10″,";","2019/9″,";","2019/8″,";","2019/7″,";","2019/6″,";",“2019/5″,";","2019/4″,";","2019/3″,";","2019/2″,";","2019/1″,";",“2018/12″,";","2018/11″,";","2018/10″,";","2018/9″,";","2018/8″,";","2018/7″,";","2018/6″,";",“2018/5″,";","2018/4″,";","2018/3″,";","2018/2″,";","2018/1″,";",“2017/12″,";","2017/11″,";","2017/10″,";","2017/9″,";","2017/8″,";","2017/7″,";","2017/6″,";",“2017/5″,";","2017/4″,";","2017/3″,";","2017/2″,";","2017/1″,";",“2016/12″,";","2016/11″,";","2016/10″,";","2016/9″,";","2016/8″,";","2016/7″,";","2016/6″,";",“2016/5″,";","2016/4″,";","2016/3″,";","2016/2″,";","2016/1″,";",“2015/12″,";","2015/11″,";","2015/10″,";","2015/9″,";","2015/8″,";","2015/7″,";","2015/6″,";",“2015/5″,";","2015/4″,";","2015/3″,";","2015/2″,";","2015/1″,";",“2014/12″,";","2014/11″,";","2014/10″,";","2014/9″,";","2014/8″,";","2014/7″,";","2014/6″,";",“2014/5″,";","2014/4″,";","2014/3″,";","2014/2″,";","2014/1″,";");
If TN>30 and LongProfit>0 and ShortProfit>0 then begin //***
NP=NetProfit;
MDD=MaxIDDrawDown;
NumMaxLost=MaxConsecLosers;
If MDD<>0 then NMRatio=(-1)*NP/MDD;
Win=NumWinTrades/TN;
ET=NP/TN;
If GrossLoss<>0 then PF=(-1)GrossProfit/GrossLoss;
If NumWinTrades<>0 then AvgP=GrossProfit/NumWinTrades;
If NumLosTrades<>0 then AvgL=GrossLoss/NumLosTrades;
If NumLosTrades<>0 and NumWinTrades<>0 then WLR=(-1)(AvgP/AvgL);
If WLR<>0 then KR=((WLR+1)Win-1)/WLR; If WLR=0 then KR=0; Gvalue=0;
If 1+WLRKR>0 and 1-KR>0 then Gvalue=WinLog(1+WLRKR)+(1-Win)Log(1-KR);
If Gvalue<>0 then Dnum=Log(2)/Log(1+Gvalue);
If Gvalue=0 then Dnum=0; EndDate=DateToJulian(Date);
If TN>10 then DTime=Dnum((EndDate-StartDate)/TN)*(1/30);
If TN<10 then DTime=0;
//Performance of the Least 20 Trade
Sum20Rank100=Text(“Less #80″);
If TN>80 then begin //80
For ii = 1 to TN-20 begin
Sum20Value=0;
For jj = 0 to 19 begin
Sum20Value=Sum20Value+TradeSeries[ii+jj];
End;
Sum20[ii]=Sum20Value;
End;
Sum20Count=0;
ZeroSum20Count=0;
For ii = 1 to TN-20 begin
If Sum20[1]>Sum20[ii] then Sum20Count=Sum20Count+1;
If 0>Sum20[ii] then ZeroSum20Count=ZeroSum20Count+1;
End;
Sum20Rank100=Text((Sum20Count/(TN-20))100:0:2); ZeroSum20Rank100=Text((ZeroSum20Count/(TN-20))100:0:2);
End; //80
//Performance of the Least 50 Trade
Sum50Rank100=Text(“Less #150″);
If TN>150 and NP>0 then begin //150
For ii = 1 to TN-50 begin
Sum50Value=0;
For jj = 0 to 49 begin
Sum50Value=Sum50Value+TradeSeries[ii+jj];
End;
Sum50[ii]=Sum50Value;
End;
Sum50Count=0;
ZeroSum50Count=0;
For ii = 1 to TN-50 begin
If Sum50[1]>Sum50[ii] then Sum50Count=Sum50Count+1;
If 0>Sum50[ii] then ZeroSum50Count=ZeroSum50Count+1;
End;
Sum50Rank100=Text((Sum50Count/(TN-50))100:0:2); ZeroSum50Rank100=Text((ZeroSum50Count/(TN-50))100:0:2);
End; //150
End; //***
PreferenceName=Text(“Compression",";","0.Seed",";","1.TN",";","2.NP",";","3.MDD",";","4.NumMaxLost",";","5.NMratio",";","6.Win%",";","7.KR",";","8.G.Value",";",“9.Dnum",";","10.Dtime",";","11.Sum20Rank",";","12.ZeroSum20Rank",";","13.Sum50Rank",";","14.ZeroSum50Rank",";",yyName,";",mmName,";");
PreferenceSet=Text(TimeLen:0:0,";",Seed:0:0,";",TN:0:0,";",NP:0:0,";",MDD:0:0,";",NumMaxLost:0:0,";",NMRatio:3:3,";",Win:2:2,";",KR:2:2,";",GValue:2:2,";",DNum:2:2,";",DTime:2:2,";",Sum20Rank100:2:2,";",ZeroSum20Rank100:2:2,";",Sum50Rank100:2:2,";",ZeroSum50Rank100:2:2,";",yyNP,";",mmNP,";");//Print TitleIf Seed=131071 then FileAppend(Text(“C:\",GetStrategyName,".Profit.List.",(Date):0:0,Symbol,"“,TimeLen:0:0,".txt"),Text(PreferenceName,";",NewLine));
//Print Each Preference List FileAppend(Text(“C:\",GetStrategyName,".Profit.List.",(Date):0:0,Symbol,"“,TimeLen:0:0,".txt"),Text(PreferenceSet,";",{PrintWatch}NewLine));End; //If LastBarOnChart then begin