TRO Statistics

post your indicators here

Moderator: moderators

zeller4
rank: 150+ posts
rank: 150+ posts
Posts: 152
Joined: Sat Jul 29, 2006 9:16 pm
Reputation: 0
Location: Geneva, FL
Gender: None specified

TRO Statistics

Postby zeller4 » Sat Dec 08, 2007 3:55 pm

Hi,
I'm looking for TRO_Statistics in a .txt file so I can read it onscreen.
I don't have TS so I can't read a .eld file...
Thanks in advance,

Kirk

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11397
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sat Dec 08, 2007 4:53 pm

Code: Select all

[LegacyColorValue = true];

{_SMAA_STATISTICS}
      
{Attn: TradeStation
if this indicator is posted on the TradeStation Forum, I, TheRumpledOne, did NOT post it there,
so I can't be blamed for this indicator having my contact info.}


{Programmer:  Avery T. Horton, Jr.  aka TheRumpledOne,
gifts and donations accepted, PO Box 43575, Tucson, AZ 85733 }

{ ? Copyright 2007 Avery T. Horton, Jr.}


{if you want to test X bars,
then right click on the indicator and enter X - 1 for additionals bars to load}

input:
iTest(close > open),
iThreshold(50),
iThresholdPct(90),
iThresholdColorFG(Black),
iThresholdColorBG(magenta),
iComment("close > open test");

var:

FG1(white),
BG1(black),

fg2(white),
bg2(black),


fg3(white),
bg3(black),

fg4(white),
bg4(black),
   
xTREND(0),
xMsg(""),

xCount(0),
xPct(0),

numbars(0);


{ INITIALIZE }

xMsg = "";

FG1 = WHITE;
BG1 = BLACK;

fg2 = WHITE;
bg2 = BLACK;

fg3 = WHITE;
bg3 = BLACK;

fg4 = WHITE;
bg4 = BLACK;

{ calculations }

{
If bartype <> 2
then begin

xMsg = "wrong interval - daily only";
Plot4(xMsg, "Message ", fg4) ;
SetPlotBGColor( 4, bg4);
end

else begin

}

numbars = numbars + 1;

If iTest
   then xCount = xCount + 1;

If  iThreshold > 0
And xCount >= iThreshold
then begin
   
   FG1 = iThresholdColorFG;
   BG1 = iThresholdColorBG;

end;

xPct = round(xCount / numbars, 2);

If  iThresholdPct > 0
And xPct * 100 >= iThresholdPct
then begin
   
   FG2 = iThresholdColorFG;
   BG2 = iThresholdColorBG;

end;

xMsg = numtostr(numbars , 0) + " bars tested";

Plot1(xCount, "#Hit", fg1) ;
SetPlotBGColor( 1, bg1);
   
Plot2(xPct, "% Hit", fg2 ) ;
SetPlotBGColor( 2, bg2 );

Plot3(iComment, "Comment", fg3 ) ;
SetPlotBGColor( 3, bg3 );

Plot4(xMsg, "Message ", fg4) ;
SetPlotBGColor( 4, bg4);

// end;

IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!

Please do NOT PM me with trading or coding questions, post them in a thread.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11397
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sat Dec 08, 2007 4:54 pm

Code: Select all

[LegacyColorValue = true];

{_SMAA_STATISTICS_M }
      

{if you want to test X bars,
then right click on the indicator and enter X - 1 for additionals bars to load}


{Attn: TradeStation
if this indicator is posted on the TradeStation Forum, I, TheRumpledOne, did NOT post it there,
so I can't be blamed for this indicator having my contact info.}


{Programmer:  Avery T. Horton, Jr.  aka TheRumpledOne,
gifts and donations accepted, PO Box 43575, Tucson, AZ 85733 }

{ ? Copyright 2007 Avery T. Horton, Jr.}

 

inputs:
   
iInd1(close),
iIndStr("close"),
iPeriods(250),


iMaxFGColor(lightgray),
iMaxBGColor(black),

iMinFGColor(cyan),
iMinBGColor(black),


iMeanFGColor(yellow),
iMeanBGColor(black),

iMedianFGColor(magenta),
iMedianBGColor(black),

iIndFGColor(white),
iIndBGColor(black);

{   
iThresholdMax(1000),

iThresholdMin(1000),

iThresholdMed(1000),

iThresholdAvg(1000);
}
   
var:

xx(white),

FG1(white),
BG1(black),

fg2(white),
bg2(black),


fg3(white),
bg3(black),

fg4(white),
bg4(black),

fg5(white),
bg5(black),

xIndStr(""),


xInd1(0),
   
xTotal(0),
xMsg(""),

xPeriods(60),
xInterval(0),

sFirstPass(true),

xMax(0),
xMin(0),

xRange(0),
xMedian(0),
xMean(0),

nHi(0),
nLo(9999999),


{commentary variables}

numbars(0);
variables:
xcomm(0),
oComm1( "" ),    
oComm2( "" ),    
oComm3( "" ),    
oComm4( "" ),    
oComm5( "" ),
oComm6( "" ),
oComm7( "" ),
oComm8( "" ),
oComm9( "" ),    
oComm10( "" );
   


{first time through}

if sFirstPass
then begin


xPeriods   = iPeriods;      
sFirstPass    = false;

{bar test}

If bartype = 4
   then xInterval = 94
else
If bartype = 3
   then xInterval = 93
else
If bartype = 2
   then xInterval = 92
else
If bartype = 1
then begin
   xInterval = BarInterval;
end; { If bartype = 1  }

end; {if sFirstPass}


{ INITIALIZE }

xMsg = "";
xIndStr  = "";

FG1 = iMaxFGColor;
BG1 = iMaxBGColor;

fg2 = iMinFGColor;
bg2 = iMinBGColor;

fg3 = iMeanFGColor;
bg3 = iMeanBGColor;

fg4 = iMedianFGColor;
bg4 = iMedianBGColor ;

fg5 = iIndFGColor;
bg5 = iIndBGColor;

xInd1      = iInd1;


{ calculations }

{
If bartype <> 2
then begin

xIndStr = "wrong interval - daily only";

Plot5( xIndStr , "Comment", white ) ;
SetPlotBGColor( 5, black);

end

else begin
}   
   
xIndStr = iIndStr ;

numbars = numbars + 1;

xTotal  = xTotal + xInd1;

xMax    = Highest(xInd1, xPeriods);

xMin   = Lowest(xInd1, xPeriods);

//xMean   = xTotal / numbars;
xMean   = Average( xInd1, xPeriods ) ;

xMedian   = xMin + (xMax - xMin) / 2;


If xMax <> xMax[1]
then begin
   xx  = fg1 ;
   fg1 = bg1 ;
   bg1 = xx ;
end ;

If xMin <> xMin[1]
then begin
   xx  = fg2 ;
   fg2 = bg2 ;
   bg2 = xx ;
end ;


{
If xMean >= iThresholdAvg
then begin
   fg3 = black;
   bg3 = green;
end;
}
   
Plot1(xMax, "Maximum", fg1) ;
SetPlotBGColor( 1, bg1);
   
Plot2(xMin, "Minimum", fg2 ) ;
SetPlotBGColor( 2, bg2);

Plot3(xMean, "Mean", fg3 ) ;
SetPlotBGColor( 3, bg3);

Plot4(xMedian , "Median", fg4 ) ;
SetPlotBGColor( 4, bg4);

Plot5(xInd1 , "Input1=", fg5 ) ;
SetPlotBGColor( 5, bg5);

Plot6( xIndStr , "Comment", white ) ;
SetPlotBGColor( 6, black);

{
IF LASTBARONCHART
THEN BEGIN

end; { IF LASTBARONCHART  }
}
   
//end; {If bartype <> 2   }
          


xComm = _fCommentary(oComm1, oComm2, oComm3, oComm4, oComm5, oComm6, oComm7, oComm8, oComm9, oComm10);

CommentaryCl(oComm1 );

CommentaryCl(oComm2 );
CommentaryCl(oComm3 );
CommentaryCl(oComm4 );
CommentaryCl(oComm5 );
CommentaryCl(oComm6 );
CommentaryCl(oComm7 );
CommentaryCl(oComm8 );
CommentaryCl(oComm9 );
CommentaryCl(oComm10 );

CommentaryCl(" " );
CommentaryCl("Statistics for : " + iIndStr);
CommentaryCl(" " );
CommentaryCl( "column 1 is MAXIMUM ") ;
CommentaryCl(" " );
CommentaryCl( "column 2 is MINIMUM ");
CommentaryCl(" " );
CommentaryCl( "column 3 is MEAN ");
CommentaryCl(" " );
CommentaryCl( "column 4 iS MEDIAN"); 
 
 
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

zeller4
rank: 150+ posts
rank: 150+ posts
Posts: 152
Joined: Sat Jul 29, 2006 9:16 pm
Reputation: 0
Location: Geneva, FL
Gender: None specified

Postby zeller4 » Sat Dec 08, 2007 9:45 pm

thanks Avery

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “Tradestation indicators”