How to output rotational trading's holding stocks?

I use the code below:

//SectorRotation.afl

SetOption("InitialEquity", 100000);
SetOption("CommissionMode", 1); //count hand cost by how much future
SetOption("CommissionAmount", 0.5); //one future hand cost 50 dollars
SetOption("MaxOpenPositions",5);
SetBacktestMode( backtestRotational );

//The number of issues to hold at a time
NumberHeld=5;//Optimize("NumberHeld",1,1,10,2);

//Allocate funds equally among all issues
PositionSize = -100/(NumberHeld);

//Set worstRankHeld to be some number greater
//than the number of positions held
NumberExtras = 25;//Optimize("NumberExtras ",0,0,50,5);
WorstRank = NumberHeld + NumberExtras;
SetOption("WorstRankHeld",WorstRank);

//The LookBack period for the Rate of change indicator
LookBack =200;//Optimize("LookBack ",1,1,400,20);

//UpDown allows the ROC to be inverted
//to treat a rising ROC as a "sell' signal
UpDown =1;//Optimize("UpDown ",2,1,2,1);

//Value of 1 allows short positions
//Value of 2 blocks short positions
AllowShort =2;//Optimize("AllowShort ",1,1,2,1);

TWII = Foreign( "^TWII", "Close" ) ;
BigMA =1;//Optimize("BigMA ",1,1,200,10);
MovAverage = MA(TWII,BigMA);

Multiplier=1;//IIf(UpDown==1,1,-1);
Score = ROC(Close,LookBack);
Score=IIf(AllowShort==1,Score,Max(Score,0));
PositionScore = Score;

I want a alert message for sending 5 holding stocks using email.
But I don't know how to output rotational trading's 5 holding stock name.
Could I output rotational trading's holding stocks to txt file or email?
Is there a sample code for this condition?

Thank you very much.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.