TRO CCI PMSM
Posted: Fri Aug 31, 2007 8:58 pm
TRO CCI PMSM
ELD and workspace attached.
ELD and workspace attached.
Code: Select all
{ _TRO_CCI_PMSMx }
{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:
iDecimals(4),
iLongColor_1(green),
iShortColor_1(red),
iWaitColor_1(yellow),
iLongColor_2(green),
iShortColor_2(red),
iWaitColor_2(yellow),
iLongColor_3(green),
iShortColor_3(red),
iWaitColor_3(yellow) ,
iLongColor_4(green),
iShortColor_4(red),
iWaitColor_4(yellow) ,
Length_1( 10 ),
OverSold_1( -100 ),
OverBought_1( 100 ),
Length_2( 10 ),
OverSold_2( -100 ),
OverBought_2( 100 ),
Length_3( 10 ),
OverSold_3( -100 ),
OverBought_3( 100 ),
Length_4( 10 ),
OverSold_4( -100 ),
OverBought_4( 100 );
variables:
CCIValue_1( 0 ),
CCIValue_2( 0 ),
CCIValue_3( 0 ),
CCIValue_4( 0 );
variables:
FG1(white),
BG1(black),
fg2(white),
bg2(black),
fg3(white),
bg3(black),
fg4(white),
bg4(black);
{commentary variables}
variables:
xcomm(0),
oComm1( "" ),
oComm2( "" ),
oComm3( "" ),
oComm4( "" ),
oComm5( "" ),
oComm6( "" ),
oComm7( "" ),
oComm8( "" ),
oComm9( "" ),
oComm10( "" );
{ INITIALIZE }
FG1 = WHITE;
BG1 = BLACK;
fg2 = WHITE;
bg2 = BLACK;
fg3 = WHITE;
bg3 = BLACK;
fg4 = WHITE;
bg4 = BLACK;
{ Alert criteria }
CCIValue_1 = _fCCI( 1, Length_1 ) ;
if CCIValue_1 < OverSold_1
then begin
Fg1 = iLongColor_1;
Bg1 = BLACK;
end
else
if CCIValue_1 > OverBought_1
then begin
Fg1 = iShortColor_1;
Bg1 = BLACK;
end
else
begin
Fg1 = iWaitColor_1;
Bg1 = BLACK;
end;
{ Alert criteria }
CCIValue_2 = _fCCI( 2, Length_2 ) ;
if CCIValue_2 < OverSold_2
then begin
Fg2 = iLongColor_2;
Bg2 = BLACK;
end
else
if CCIValue_2 > OverBought_2
then begin
Fg2 = iShortColor_2;
Bg2 = BLACK;
end
else
begin
Fg2 = iWaitColor_2;
Bg2 = BLACK;
end;
CCIValue_3 = _fCCI( 3, Length_3 ) ;
if CCIValue_3 < OverSold_3
then begin
Fg3 = iLongColor_3;
Bg3 = BLACK;
end
else
if CCIValue_3 > OverBought_3
then begin
Fg3 = iShortColor_3;
Bg3 = BLACK;
end
else
begin
Fg3 = iWaitColor_3;
Bg3 = BLACK;
end;
CCIValue_4 = _fCCI( 4, Length_4 ) ;
if CCIValue_4 < OverSold_4
then begin
Fg4 = iLongColor_4;
Bg4 = BLACK;
end
else
if CCIValue_4 > OverBought_4
then begin
Fg4 = iShortColor_4;
Bg4 = BLACK;
end
else
begin
Fg4 = iWaitColor_4;
Bg4 = BLACK;
end;
Plot1( 4 , "Trade1", Fg1 ) ;
Plot2( 3 , "Trade2", Fg2 ) ;
Plot3( 2 , "Trade3", Fg3 ) ;
Plot4( 1 , "Trade4", Fg4 ) ;
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 );
Code: Select all
{ _TRO_Pivot_HiLo }
{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 2006 Avery T. Horton, Jr.}
Inputs:
iDecimals(2);
inputs:
Instance( 1 ),
iPriceH( High ),
iPriceL( Low ),
iColorH( darkgray ),
iColorL( darkblue ),
LeftStrength( 3 ),
RightStrength( 3 ),
Length( 21 );
variables:
xPeriods(60),
xInterval(0),
sFirstPass(true);
variables:
xInd(0),
tInd(""),
tAlert("");
{ color variables}
variables:
FG1(white),
BG1(black),
fg2(white),
bg2(black),
fg3(white),
bg3(black),
fg4(white),
bg4(black);
{commentary variables}
variables:
xcomm(0),
oComm1( "" ),
oComm2( "" ),
oComm3( "" ),
oComm4( "" ),
oComm5( "" ),
oComm6( "" ),
oComm7( "" ),
oComm8( "" ),
oComm9( "" ),
oComm10( "" );
{ price/volume/time variables}
variables:
xSymbol_Name( getsymbolname ),
xVolume(0),
xDate(0),
xTime(0),
xOpen(0),
xClose(0),
xHigh(0),
xLow(0);
variables:
PivotHi( 0 ),
PivotHiBar( -1 ),
RecentPivotHi( 0 );
variables:
PivotLow( 0 ),
PivotLowBar( -1 ),
RecentPivotLow( 0 );
{first time through}
if sFirstPass
then begin
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 }
FG1 = iColorH;
BG1 = BLACK;
fg2 = iColorL;
bg2 = BLACK;
fg3 = WHITE;
bg3 = BLACK;
fg4 = WHITE;
bg4 = BLACK;
tInd = "";
tAlert = "";
xDate = Date ;
xTime = Time ;
xOpen = Open;
xClose = Close;
xHigh = High;
xLow = Low;
xVolume = volume ;
{ PROCESSING }
PivotHi = PivotHighVS( Instance, iPriceH, LeftStrength, RightStrength, Length ) ;
PivotHiBar = PivotHighVSBar( Instance, iPriceH, LeftStrength, RightStrength, Length ) ;
if PivotHiBar <> -1 then
begin
RecentPivotHi = PivotHi ;
Alert ;
end;
PivotLow = PivotLowVS( Instance, iPriceL, LeftStrength, RightStrength, Length ) ;
PivotLowBar = PivotLowVSBar( Instance, iPriceL, LeftStrength, RightStrength, Length ) ;
if PivotLowBar <> -1 then
begin
RecentPivotLow = PivotLow ;
Alert ;
end;
{
{ Alert criteria }
If xInd > 0
then begin
Fg1 = green;
Bg1 = BLACK;
end
else
If xInd < 0
then begin
Fg1 = red;
Bg1 = BLACK;
end
else
begin
Fg1 = white;
Bg1 = BLACK;
end;
{ Alert }
if tAlert <> ""
and tAlert <> tAlert[1]
then Alert( tAlert ) ;
}
{ PLOT }
Plot1( RecentPivotHi, "PivotHi" , fg1 ) ;
SetPlotBGColor( 1, bg1);
Plot2( RecentPivotLow, "PivotLow", fg2 ) ;
SetPlotBGColor( 2, bg2);
{
Plot3( xSellShares, "Sell Shares", fg3 ) ;
SetPlotBGColor( 3, bg3);
Plot4( Open_AvgCost , "AvgCost", fg4 ) ;
SetPlotBGColor( 4, bg4);
}
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( "xInd: ", NumToStr( xInd , iDecimals) );
// CommentaryCl( "xFreeShares: ", NumToStr( xFreeShares , 0 ) );
Code: Select all
{ _AutoVerticalLine }
// https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=59448
{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.}
{Modifying Programmer: Avery T. Horton, Jr. aka TheRumpledOne,
gifts and donations accepted, PO Box 43575, Tucson, AZ 85733 }
{ ? Copyright 2007 Avery T. Horton, Jr.}
inputs:
iBuyZone(false),
iOffset(.03),
iPlot(false),
iOpenColor(white),
iHighColor(darkgreen),
iLowColor(darkred),
iTimeInterval( 60 ) ,
iLineStyle( Tool_Dotted ),
iLineColor( Yellow ) ;
variables:
xLongZone(0),
xShortZone(0),
xHigh(0),
xLow(0),
xOpen(0),
TL_ID( 0 ) ,
MinutesInSess( 0 ) ,
LineTime( 0 ) ;
LineTime = TimeToMinutes(time);
if Mod( LineTime, iTimeInterval ) = 0
then begin
TL_ID = TL_New( Date, time , High , Date, time , High + 1 ) ;
TL_SetExtLeft( TL_ID, True ) ;
TL_SetExtRight( TL_ID, True ) ;
TL_SetColor( TL_ID, iLineColor ) ;
TL_SetStyle( TL_ID, iLineStyle ) ;
xOpen = open ;
xHigh = open ;
xLow = open ;
xLongZone = xOpen + iOffset ;
xShortZone = xOpen - iOffset ;
end ;
If High > xHigh
then xHigh = High ;
If Low < xLow
then xLow = Low ;
{ PLOT }
if iPlot
then begin
plot1(xOpen, "o", iOpenColor ) ;
plot2(xHigh, "h", iHighColor ) ;
plot3(xLow, "l", iLowColor ) ;
end;
if iBuyZone
then begin
plot4(xLongZone, "LZ", blue ) ;
plot5(xShortZone, "SZ", red ) ;
end;
Code: Select all
{ _TRO_Candle_PMSMx }
{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.}
variables:
iLongColor_1(green),
iShortColor_1(red),
iWaitColor_1(yellow),
iLongColor_2(green),
iShortColor_2(red),
iWaitColor_2(yellow),
iLongColor_3(green),
iShortColor_3(red),
iWaitColor_3(yellow) ,
iLongColor_4(green),
iShortColor_4(red),
iWaitColor_4(yellow) ,
Candel_1( 0 ),
Candel_2( 0 ),
Candel_3( 0 ),
Candel_4( 0 );
variables:
FG1(white),
BG1(black),
fg2(white),
bg2(black),
fg3(white),
bg3(black),
fg4(white),
bg4(black);
{commentary variables}
variables:
xcomm(0),
oComm1( "" ),
oComm2( "" ),
oComm3( "" ),
oComm4( "" ),
oComm5( "" ),
oComm6( "" ),
oComm7( "" ),
oComm8( "" ),
oComm9( "" ),
oComm10( "" );
{ INITIALIZE }
FG1 = WHITE;
BG1 = BLACK;
fg2 = WHITE;
bg2 = BLACK;
fg3 = WHITE;
bg3 = BLACK;
fg4 = WHITE;
bg4 = BLACK;
{ Alert criteria }
Candel_1 = close of data1 - open of data1 ;
if Candel_1 > 0
then begin
Fg1 = iLongColor_1;
Bg1 = BLACK;
end
else
if Candel_1 < 0
then begin
Fg1 = iShortColor_1;
Bg1 = BLACK;
end
else
begin
Fg1 = iWaitColor_1;
Bg1 = BLACK;
end;
{ Alert criteria }
Candel_2 = close of data2 - open of data2 ;
if Candel_2 > 0
then begin
Fg2 = iLongColor_2;
Bg2 = BLACK;
end
else
if Candel_2 < 0
then begin
Fg2 = iShortColor_2;
Bg2 = BLACK;
end
else
begin
Fg2 = iWaitColor_2;
Bg2 = BLACK;
end;
Candel_3 = close of data3 - open of data3 ;
if Candel_3 > 0
then begin
Fg3 = iLongColor_3;
Bg3 = BLACK;
end
else
if Candel_3 < 0
then begin
Fg3 = iShortColor_3;
Bg3 = BLACK;
end
else
begin
Fg3 = iWaitColor_3;
Bg3 = BLACK;
end;
Candel_4 = close of data4 - open of data4 ;
if Candel_4 > 0
then begin
Fg4 = iLongColor_4;
Bg4 = BLACK;
end
else
if Candel_4 < 0
then begin
Fg4 = iShortColor_4;
Bg4 = BLACK;
end
else
begin
Fg4 = iWaitColor_4;
Bg4 = BLACK;
end;
Plot1( 4 , "Trade1", Fg1 ) ;
Plot2( 3 , "Trade2", Fg2 ) ;
Plot3( 2 , "Trade3", Fg3 ) ;
Plot4( 1 , "Trade4", Fg4 ) ;
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 );