2000i Versions of TheRumpledOne's Indicators?

free & uncensored discussion arena for TheRumpledOne

Moderator: moderators

TraderDx
rank: <50 posts
rank: <50 posts
Posts: 2
Joined: Tue May 15, 2007 10:22 pm
Reputation: 0
Gender: None specified

2000i Versions of TheRumpledOne's Indicators?

Postby TraderDx » Wed May 16, 2007 4:19 pm

Is there a 2000i version? ELD's can't be imported in 2000i. I could convert them and make a 2000i version available, if I had the source in text.

Are there others that use 2000i?

Thanks,

TraderDx

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

mugskei
rank: <50 posts
rank: <50 posts
Posts: 2
Joined: Fri May 18, 2007 7:35 pm
Reputation: 0
Gender: None specified

Postby mugskei » Fri May 18, 2007 7:49 pm

I have been looking for TRO indicators for 2000i for some time now. It would be nice if the code were posted with the ELD's.

John

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Fri May 18, 2007 8:25 pm

check here its the motherloads of TROs stuff w/ code but its for ts8. it would be great if you could convert the code to 2000i

http://kreslik.com/forums/dload.php?act ... y&cat_id=8

airball

TraderDx
rank: <50 posts
rank: <50 posts
Posts: 2
Joined: Tue May 15, 2007 10:22 pm
Reputation: 0
Gender: None specified

Postby TraderDx » Fri May 18, 2007 9:11 pm

The problem is 2000i can't open a TS 8 file, so unfortunately I can't do the conversion. I need the source as text. I would be willing to convert it and post back as 2000i for others.

This makes a bit of busy work for Rumpled. You can import 2000i into TS 8, but you can't do the opposite.

- Thanks

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

Postby TheRumpledOne » Fri May 18, 2007 11:18 pm

_TRO_PLOT

Code: Select all

[LegacyColorValue = true];

{ _TRO_PLOT - Plot user input }
   
   
{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),

iOffset(0),

iPlot1(highw(1)),

iPlot2(  maxlist(openw(1), closew(1))),

iPlot3(  (highw(1) + loww(1)) * .5),

iPlot4(  minlist(openw(1), closew(1))),

iPlot5(  loww(1)),

iPlot6(  0),

iPlot7(  0),

iPlot8(  0),

iPlot9(  0),

iPlot10(  0),

   iColor1( green),
   iColor2( darkgreen),
   iColor3( magenta) ,
   iColor4( darkred),
   iColor5( red),
   iColor6( darkbrown),
   iColor7( darkblue),
   iColor8( darkblue),
   iColor9( darkblue),
   iColor10( darkblue),

   idummy("");

{commentary variables}

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

if iPlot1 <> 0    then
   Plot1[iOffset]( iPlot1 , "1", iColor1 );

if iPlot2 <> 0    then
Plot2[iOffset]( iPlot2 , "2", iColor2 );

if iPlot3 <> 0    then
   Plot3[iOffset]( iPlot3 , "3", iColor3 );

if iPlot4 <> 0    then
   Plot4[iOffset]( iPlot4 , "4", iColor4 );

if iPlot5 <> 0    then
   Plot5[iOffset]( iPlot5 , "5", iColor5 );

if iPlot6 <> 0    then
   Plot6[iOffset]( iPlot6 , "6", iColor6 );

if iPlot7 <> 0    then
   Plot7[iOffset]( iPlot7 , "7", iColor7 );


if iPlot8 <> 0    then
   Plot8[iOffset]( iPlot8 , "8", iColor8 );

if iPlot9 <> 0    then
   Plot9[iOffset]( iPlot9 , "9", iColor9 );

if iPlot10 <> 0    then
   Plot10[iOffset]( iPlot10 , "10", iColor10 );

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( "iPlot1: ", NumToStr( iPlot1 , iDecimals) );
CommentaryCl( "iPlot2: ", NumToStr( iPlot2 , iDecimals) );
CommentaryCl( "iPlot3: ", NumToStr( iPlot3 , iDecimals) );
CommentaryCl( "iPlot4: ", NumToStr( iPlot4 , iDecimals) );
CommentaryCl( "iPlot5: ", NumToStr( iPlot5 , iDecimals) );
CommentaryCl( "iPlot6: ", NumToStr( iPlot6 , iDecimals) );
CommentaryCl( "iPlot7: ", NumToStr( iPlot7 , iDecimals) );
CommentaryCl( "iPlot8: ", NumToStr( iPlot8 , iDecimals) );
CommentaryCl( "iPlot9: ", NumToStr( iPlot9 , iDecimals) );
CommentaryCl( "iPlot10: ", NumToStr( iPlot10 , iDecimals) );

CommentaryCl( " " );
 
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.

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: 15672
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3038
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri May 18, 2007 11:20 pm

_TRO_PMSM_SAK - display user input as POOR MAN'S SLOT MACHINE

Code: Select all

[LegacyColorValue = true];

// _TRO_PMSM_SAK - display user input as POOR MAN'S SLOT MACHINE
   

{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),

iInputA1( close ),   
iInputB1( open ),

iAboveColor1 ( green ),
iEqualColor1 ( yellow ),
iBelowColor1 ( red ),

iInputA2(-999.9),
iInputB2(-999.9),
 
iAboveColor2 ( green ),
iEqualColor2 ( yellow ),
iBelowColor2 ( red ),

iInputA3(-999.9),   
iInputB3(-999.9),

iAboveColor3 ( green ),
iEqualColor3 ( yellow ),
iBelowColor3 ( red ),


iInputA4(-999.9),   
iInputB4(-999.9),

iAboveColor4 ( green ),
iEqualColor4 ( yellow ),
iBelowColor4 ( red );



variables:
 
xDecimals(0),

sFirstPass(true),
 
xPlot1( -1 ),
xPlot2( -2 ),
xPlot3( -3 ),
xPlot4( -4 );

variables:
 
FG1(black),
BG1(black),

fg2(black),
bg2(black),

fg3(black),
bg3(black),

fg4(black),
bg4(black);


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


{ INITIALIZE }

if sFirstPass
then begin
   
xDecimals = iDecimals ;
end;


{ Alert criteria }

If iInputA1    > iInputB1
then begin
   Fg1 = iAboveColor1;
   Bg1 = BLACK;
end
else
If iInputA1   < iInputB1
then begin
   Fg1 = iBelowColor1;
   Bg1 = BLACK;
end
else
begin
   Fg1 = iEqualColor1;
   Bg1 = BLACK;
end;

if iInputA2    <> -999.9
then begin
If iInputA2    > iInputB2
then begin
   Fg2 = iAboveColor2;
   Bg2 = BLACK;
end
else
If iInputA2   < iInputB2
then begin
   Fg2 = iBelowColor2;
   Bg2 = BLACK;
end
else
begin
   Fg2 = iEqualColor2;
   Bg2 = BLACK;
end;
end;

if iInputA3    <> -999.9
then begin
If iInputA3    > iInputB3
then begin
   Fg3 = iAboveColor3;
   Bg3 = BLACK;
end
else
If iInputA3   < iInputB3
then begin
   Fg3 = iBelowColor3;
   Bg3 = BLACK;
end
else
begin
   Fg3 = iEqualColor3;
   Bg3 = BLACK;
end;
end;

if iInputA4    <> -999.9
then begin
If iInputA4    > iInputB4
then begin
   Fg4 = iAboveColor4;
   Bg4 = BLACK;
end
else
If iInputA4   < iInputB4
then begin
   Fg4 = iBelowColor4;
   Bg4 = BLACK;
end
else
begin
   Fg4 = iEqualColor4;
   Bg4 = BLACK;
end;
end;

{ PLOT }


Plot1( xPlot1 , "1", fg1 ) ;
SetPlotBGColor( 1, bg1);

Plot2( xPlot2 , "2", fg2 ) ;
SetPlotBGColor( 2, bg2);

Plot3( xPlot3 , "3", fg3 ) ;
SetPlotBGColor( 3, bg3);

Plot4( xPlot4 , "4", 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( "iInputA1: ", NumToStr( iInputA1 , xDecimals) );
CommentaryCl( "iInputB1: ", NumToStr( iInputB1 , xDecimals) );
CommentaryCl( " " );

CommentaryCl( "iInputA2: ", NumToStr( iInputA2 , xDecimals) );
CommentaryCl( "iInputB2: ", NumToStr( iInputB2 , xDecimals) );
CommentaryCl( " " );

CommentaryCl( "iInputA3: ", NumToStr( iInputA3 , xDecimals) );
CommentaryCl( "iInputB3: ", NumToStr( iInputB3 , xDecimals) );
CommentaryCl( " " );

CommentaryCl( "iInputA4: ", NumToStr( iInputA4 , xDecimals) );
CommentaryCl( "iInputB4: ", NumToStr( iInputB4 , xDecimals) );
CommentaryCl( " " );
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: 15672
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3038
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri May 18, 2007 11:21 pm

_TRO_EVALUATOR - evaluates user input trade triggers

Code: Select all

[LegacyColorValue = true];

// _TRO_EVALUATOR  - evaluates user input trade triggers
   

{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:

iRadar(false),       // true = radar, false = Chart

iLgEntryColor ( blue),
iLgExitColor (    red),

iShEntryColor (    darkmagenta),
iShExitColor (    darkcyan),

iLgEntrySignal( 4) ,
iLgExitSignal( 1) ,

iShEntrySignal( 4) ,
iShExitSignal( 1) ,


iLgEntryTrigger1( close crosses above  ( h[1] + l[1] ) *.5),   
iShEntryTrigger1( close crosses below  ( h[1] + l[1] ) *.5),

iLgExitTrigger1(false),
iShExitTrigger1(false),


iLgEntryTrigger2( close crosses above  maxlist(o[1],c[1])),   
iShEntryTrigger2( close crosses below  maxlist(o[1],c[1])),

iLgExitTrigger2(c < ( h + l ) *.5),
iShExitTrigger2(c > ( h + l ) *.5),
 
iLgEntryTrigger3( close crosses above minlist(o[1],c[1])),   
iShEntryTrigger3( close crosses below minlist(o[1],c[1])),

iLgExitTrigger3(false),
iShExitTrigger3(false),


{

iLgEntryTrigger1(    close crosses above  ( h[1] + l[1] ) *.5),   
iShEntryTrigger1(    close crosses below  ( h[1] + l[1] ) *.5),

iLgExitTrigger1(false),
iShExitTrigger1(false),


iLgEntryTrigger2(    close crosses above  maxlist(o[1],c[1])),   
iShEntryTrigger2(    close crosses below  maxlist(o[1],c[1])),

iLgExitTrigger2(c < ( h + l ) *.5),
iShExitTrigger2(c > ( h + l ) *.5),
 
iLgEntryTrigger3(    close crosses above minlist(o[1],c[1])),   
iShEntryTrigger3(    close crosses below minlist(o[1],c[1])),

iLgExitTrigger3(false),
iShExitTrigger3(false),

}

iLgEntryTrigger4( (_fDynR(5)-_fDynS(5))>.0005),   
iShEntryTrigger4( (_fDynR(5)-_fDynS(5))>.0005),

iLgExitTrigger4(  false),
iShExitTrigger4(  false),
 


iLgEntryTrigger5((close-_fDynS(5))<.0002),
iShEntryTrigger5((_fDynR(5)-close)<.0002),

iLgExitTrigger5(false),
iShExitTrigger5(false),


iLgEntryTrigger6(false),   
iShEntryTrigger6(false),

iLgExitTrigger6(false),
iShExitTrigger6(false),
 
iLgEntryTrigger7(false),   
iShEntryTrigger7(false),

iLgExitTrigger7(false),
iShExitTrigger7(false),


iLgEntryTrigger8(false),
iShEntryTrigger8(false),

iLgExitTrigger8(false),
iShExitTrigger8(false);


variables:

tAlert( "" ) ,

sFirstPass(true),
 
xPlot1( 00 ),
xPlot2( 00 ),
xPlot3( 00 ),
xPlot4( 00 );

variables:
 
FG1(white),
BG1(black),

fg2(white),
bg2(black),

fg3(white),
bg3(black),

fg4(white),
bg4(black);



{ INITIALIZE }

tAlert = ""  ;

if iRadar
then begin
{
FG1 = BLACK;
BG1 = BLACK;

fg2 = BLACK;
bg2 = BLACK;

fg3 = BLACK;
bg3 = BLACK;

fg4 = BLACK;
bg4 = BLACK;
}
FG1 = white;
BG1 = BLACK;

fg2 = white;
bg2 = BLACK;

fg3 = white;
bg3 = BLACK;

fg4 = white;
bg4 = BLACK;
end
else begin
FG1 = white;
BG1 = darkgray;

fg2 = white;
bg2 = darkgray;

fg3 = darkgray;
bg3 = darkgray;

fg4 = darkgray;
bg4 = darkgray;
end; // if iRadar


xPlot1 = 0 ;
xPlot2 = 0 ;
xPlot3 = 0 ;
xPlot4 = 0 ;



{ Alert criteria }


If iLgEntryTrigger1
then begin
   xPlot1 = xPlot1 + 1 ;
end;


If iLgEntryTrigger2
then begin
   xPlot1 = xPlot1 + 1 ;
end;

If iLgEntryTrigger3
then begin
   xPlot1 = xPlot1 + 1 ;
end;

If iLgEntryTrigger4
then begin
   xPlot1 = xPlot1 + 1 ;
end;


If iLgEntryTrigger5
then begin
   xPlot1 = xPlot1 + 1 ;
end;


If iLgEntryTrigger6
then begin
   xPlot1 = xPlot1 + 1 ;
end;

If iLgEntryTrigger7
then begin
   xPlot1 = xPlot1 + 1 ;
end;

If iLgEntryTrigger8
then begin
   xPlot1 = xPlot1 + 1 ;
end;

If iLgExitTrigger1
then begin
   xPlot2 = xPlot2 + 1 ;
end;


If iLgExitTrigger2
then begin
   xPlot2 = xPlot2 + 1 ;
end;

If iLgExitTrigger3
then begin
   xPlot2 = xPlot2 + 1 ;
end;

If iLgExitTrigger4
then begin
   xPlot2 = xPlot2 + 1 ;
end;

If iLgExitTrigger5
then begin
   xPlot2 = xPlot2 + 1 ;
end;


If iLgExitTrigger6
then begin
   xPlot2 = xPlot2 + 1 ;
end;

If iLgExitTrigger7
then begin
   xPlot2 = xPlot2 + 1 ;
end;

If iLgExitTrigger8
then begin
   xPlot2 = xPlot2 + 1 ;
end;








If iShEntryTrigger1
then begin
   xPlot3 = xPlot3 + 1 ;
end;


If iShEntryTrigger2
then begin
   xPlot3 = xPlot3 + 1 ;
end;

If iShEntryTrigger3
then begin
   xPlot3 = xPlot3 + 1 ;
end;

If iShEntryTrigger4
then begin
   xPlot3 = xPlot3 + 1 ;
end;




If iShEntryTrigger5
then begin
   xPlot3 = xPlot3 + 1 ;
end;


If iShEntryTrigger6
then begin
   xPlot3 = xPlot3 + 1 ;
end;

If iShEntryTrigger7
then begin
   xPlot3 = xPlot3 + 1 ;
end;

If iShEntryTrigger8
then begin
   xPlot3 = xPlot3 + 1 ;
end;

If iShExitTrigger1
then begin
   xPlot4 = xPlot4 + 1 ;
end;


If iShExitTrigger2
then begin
   xPlot4 = xPlot4 + 1 ;
end;

If iShExitTrigger3
then begin
   xPlot4 = xPlot4 + 1 ;
end;

If iShExitTrigger4
then begin
   xPlot4 = xPlot4 + 1 ;
end;

If iShExitTrigger5
then begin
   xPlot4 = xPlot4 + 1 ;
end;


If iShExitTrigger6
then begin
   xPlot4 = xPlot4 + 1 ;
end;

If iShExitTrigger7
then begin
   xPlot4 = xPlot4 + 1 ;
end;

If iShExitTrigger8
then begin
   xPlot4 = xPlot4 + 1 ;
end;


If xPlot1 >= iLgEntrySignal
then begin
   tAlert = "LgEntry" ;
   Fg1 = iLgEntryColor ;
end;

If  xPlot1 >  0
and xPlot1[1] = 0
then begin
   Fg1 = iLgEntryColor ;
   Bg1 = white ;
end;




If xPlot2 >= iLgExitSignal
then begin
   tAlert = "LgExit" ;
   Fg2 = iLgExitColor ;
end;

If  xPlot2 >  0
and xPlot2[1] = 0
then begin
   Fg2 = iLgExitColor ;
   Bg2 = white ;
end;


If xPlot3 >= iShEntrySignal
then begin
   Fg3 = iShEntryColor ;
   tAlert = "ShEntry" ;
end;

If  xPlot3 >  0
and xPlot3[1] = 0
then begin
   Fg3 = iShEntryColor ;
   Bg3 = white ;
end;

 
If xPlot4 >= iShExitSignal
then begin
   Fg4 = iShExitColor ;
   tAlert = "ShExit" ;
end;

If  xPlot4 >  0
and xPlot4[1] = 0
then begin
   Fg4 = iShExitColor ;
   Bg4 = white ;
end;


{ Alert }

if tAlert <> ""
and tAlert <> tAlert[1]
   then Alert( tAlert ) ;


{ PLOT }


if iRadar
then begin

Plot1( xPlot1 , "LgEntry", fg1 ) ;
SetPlotBGColor( 1, bg1);

Plot2( xPlot2 , "LgExit", fg2 ) ;
SetPlotBGColor( 2, bg2);

Plot3( xPlot3 , "ShEntry", fg3 ) ;
SetPlotBGColor( 3, bg3);

Plot4( xPlot4 , "ShExit", fg4 ) ;
SetPlotBGColor( 4, bg4);
end
else begin

Plot1( xPlot1 , "LgEntry", fg1 ) ;

Plot2( xPlot2 , "LgExit", fg2 ) ;

Plot3( 0 - xPlot3 , "ShEntry", fg3 ) ;

Plot4( 0 - xPlot4 , "ShExit", fg4 ) ;
end; // if iRadar
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: 15672
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3038
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri May 18, 2007 11:22 pm

{_TRO_SAK }

{ SLOT MACHINE SWISS ARMY KNIFE}

Code: Select all

[LegacyColorValue = true];

{_TRO_SAK  }
   
{ SLOT MACHINE SWISS ARMY KNIFE}
         
 
{iMode = "auto" is auto mode - sets xPeriods based on chart interval}

{iMode not =  "auto" is manual mode - sets xPeriods to iPeriods }

{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:   
iMode("auto"),   { if "auto" code sets xPeriods, if not "auto" code uses iPeriods}
   
iInd(RSI(close,2)),   
      
iIndStr("rsi(close,2)"),

   iCrossSwitch(false),
   iCrossOver( 50 ),    
   iCrossAMsg("X+ " ),
   iCrossBMsg("X-" ),

   iOverSwitch(false),            
   iOverSold( 1 ),
   iOverSMsg("O/S" ),
   iOverSColor( cyan ),
   iOverBought( 90 ),
   iOverBMsg("O/B" ),
   iOverBColor( Red ) ,

iNormalize(false),
iPeriods(60),
iDecimals(2),
iDivergence(false),
iDivPeriods(10),
      
idummy("");

variables:

xAppType(0), //

xPeriods(60),
xInterval(0),

sFirstPass(true),

x(0),
y(0),
   
xInd(0),
tIND(""),
tMsg(""),
xBlank(" "),

FG1(white),
BG1(black),

fg2(white),
bg2(black),

idx(0),
MaxLookBack(0),

x1PD(0),
x1ND(0),

fg3(white),
bg3(black),

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


FoundDivergence(false),
xDivergence(false),

vdummy("");

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

{first time through}

if sFirstPass
then begin

xAppType = GetAppInfo(aiApplicationType);        // returns a value that identifies the calling window type

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  }

{mode test}

If iMode <> "Auto" and iMode <> "auto" and iMode <> "AUTO"
    then xPeriods = iPeriods
   else xPeriods = _fModePeriods(xInterval);

end; {if sFirstPass}

{ INITIALIZE }
   
xInd        = iInd;
xDivergence = iDivergence;

tIND = "";
tMsg = "";

FG1 = WHITE;
BG1 = BLACK;

fg2 = WHITE;
bg2 = BLACK;

fg3 = WHITE;
bg3 = BLACK;

fg4 = WHITE;
bg4 = BLACK;

{ NORMALIZE?  }

If iNormalize
    then begin
   xInd = _fNORMALIZER(iInd, xPeriods);
   xInd = xInd * 100;
    end
    else xInd = iInd;

{ END NORMALIZE }

{ CHECK POSITION VS LAST POSITION }

If xIND > xIND[1]
then begin
   tIND = "+";
   FG1 = BLACK;
   BG1 = green;
end
else
If xIND < xIND[1]
then begin
   tIND = "-";
   FG1 = BLACK;
   BG1 = red;
end
else
begin
   tIND = "=";
   FG1 = white;
   BG1 = black;
end;

 
If xInd > xInd[1]
then begin
   FG3 = green;
   Bg3 = BLACK;
end
else begin
   Fg3 = red;
   Bg3 = BLACK;
end;

{ END CHECK POSITION VS LAST POSITION }


{ CHECK OVERBOUGHT/OVERSOLD }

If iOverSwitch
then begin   

If xInd > iOverBought
then begin
   tMsg = iOverBMsg + xBlank +  NumToStr( iOverBought, iDecimals );
   Bg4 = BLACK;
   Fg4 = iOverBColor;
   Fg2 = BLACK;
   Bg2 = iOverBColor;

end
else
If xInd < iOverSold
then begin   
   tMsg = iOverSMsg + xBlank +  NumToStr( iOverSold , iDecimals );
   Bg4 = BLACK;
   Fg4 = iOverSColor;
   Fg2 = BLACK;
   Bg2 = iOverSColor;

end
else
begin
   Fg4 = white;
   Bg4 = BLACK;
end;

end; { If iOverSwitch }

{ END CHECK OVERBOUGHT/OVERSOLD }


{ determine # bars in trend }

xTREND = _fBarsSinceXOver(xInd,xInd[1],xPeriods);


{ CHECK CROSSOVER  }

If iCrossSwitch
then begin   

If xInd crosses above iCrossOver
then begin
   tMsg = tMsg + xBlank + iCrossAMsg + xBlank +  NumToStr( iCrossOver, iDecimals );
   Fg4 = BLACK;
   Bg4 = yellow;
   Fg2 = BLACK;
   Bg2 = yellow;
end;

If xInd crosses below iCrossOver
then begin
   tMsg = tMsg + xBlank + iCrossBMsg +  xBlank + NumToStr( iCrossOver, iDecimals );
   Fg4 = red;
   Bg4 = yellow;
   Fg2 = red;
   Bg2 = yellow;
end;

end; { If iCrossSwitch }

{ END  CHECK CROSSOVER  }



{DIVERGENCE TEST}

if xDivergence
then begin
   
FoundDivergence = False ;   
idx = 2;
x1PD = 0;
x1ND = 0;

// for idx = 2 to MaxLookBack begin
while (FoundDivergence = False) and (idx < iDivPeriods) begin      

   if  xInd < xInd[idx]
   and close > close[idx]
      then begin
      x1ND = idx;   
      tMsg = tMsg +  xBlank + " NegDiv " +  xBlank + NumToStr(idx, 0);
      end;
   if xInd > xInd[idx]
   and close < close[idx]
      then begin
      x1PD = idx;
      tMsg = tMsg +  xBlank + " PosDiv " +  xBlank + NumToStr(idx, 0);
      end;
   If x1ND <> 0
   or x1PD <> 0
   then begin   
      FoundDivergence = True ;
   end;
idx = idx + 1;
end;


If x1ND > 0
then begin
end;

If x1PD > 0
then begin
end;

end; {if xDivergence}


{ PLOT }

if xAppType = 2
then begin
Plot1( tIND, "IND", fg1 ) ;
SetPlotBGColor( 1, bg1);
end;

Plot2( xIND, "IND=", fg2 ) ;
SetPlotBGColor( 2, bg2);


if xAppType = 2
then begin

Plot3( xTREND , "Trend", fg3 ) ;
SetPlotBGColor( 3, bg3);

Plot4( tMsg, "Msg", FG4 ) ;
SetPlotBGColor( 4, bg4);

Plot5( iIndStr, "Plot" , white );
end;


{ Commentary }

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( "column 1 is SLOT MACHINE directional indicator ");

CommentaryCl( "column 2 is indicator value");

CommentaryCl( "column 3 is number of bars this trend");

CommentaryCl( "column 4 indicates o/b, o/s, crossovers, divergence");

CommentaryCl(" " );

CommentaryCl( iIndStr, ": ", NumToStr(xIND,iDecimals) );

CommentaryCl(" " );
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: 15672
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3038
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri May 18, 2007 11:24 pm

_TRO_Static_Fibs - draw fibs between user inputs

Code: Select all

{ _TRO_Static_Fibs - draw fibs between user inputs }
   
{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:

   iStartDate(1070101),  // if not intraday, date to start counting

   iPrice( Close ),
   iDecimals(2),
   iPeriods(5),
   iHigh( HighD(0) ),
   iLow( LowD(0) ),

   iFibPlot("R"),         // "P" = projections, "R" = retracements
iFib1(.24),
iFib2(.38),
iFib3(.50),
iFib4(.62),
iFib5(.76),

iFib1Color(darkcyan ),
iFib2Color(darkbrown),
iFib3Color(darkgray),
iFib4Color(darkbrown ),
iFib5Color(darkcyan  ),
   HighColor(  red),
   LowColor(  blue),

   idummy("");

variables:

xFib1(iFib1),
xFib2(iFib2),
xFib3(iFib3),
xFib4(iFib4),
xFib5(iFib5),

tFib(""),

xLowestLow(0),
xHighestHigh(0),
xRange(0),

xPosition(0),
   
oExtremeVal( 0 ),
oExtremeBar( 0 ) ;


variables:

xBars( 0 ),
xPeriods(05),
xOldPeriods(0),

   Dynamic_R( 0 ),
   Dynamic_S( 0 ),
   OldDynamic_R( 0 ),
   OldDynamic_S( 0 ),
   PrevDynamic_R( 0 ),
   PrevDynamic_S( 0 ) ;


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

{ CALCULATIONS }
         



If date this bar >= iStartDate
then begin

{ high / low for period }
   

xBars = xBars + 1;


Dynamic_S = iLow  ; // lowest low
Dynamic_R = iHigh ; // highest high
 
 
If iFibPlot = "R"
Or iFibPlot = "r"
then begin
 

xLowestLow =  Dynamic_S ;

xRange        = Dynamic_R -  Dynamic_S ;

xFib1      = iFib1 * xRange + xLowestLow;
xFib2      = iFib2 * xRange + xLowestLow;
xFib3      = iFib3 * xRange + xLowestLow;
xFib4      = iFib4 * xRange + xLowestLow;
xFib5      = iFib5 * xRange + xLowestLow;
end // If iFibPlot = "R"...
else Begin
 

xLowestLow   = Dynamic_S ;

xHighestHigh = Dynamic_R ;

xRange        = xHighestHigh - xLowestLow;

If close > OpenD(0)
then begin
xFib1      = iFib1 * xRange + xHighestHigh;  // high projections
xFib2      = iFib2 * xRange + xHighestHigh;
xFib3      = iFib3 * xRange + xHighestHigh;
xFib4      = iFib4 * xRange + xHighestHigh;
xFib5      = iFib5 * xRange + xHighestHigh;
end
else begin
xFib1      = xLowestLow - iFib1 * xRange ;  // low projections
xFib2      = xLowestLow - iFib2 * xRange ;
xFib3      = xLowestLow - iFib3 * xRange ;
xFib4      = xLowestLow - iFib4 * xRange ;
xFib5      = xLowestLow - iFib5 * xRange ;
end;

end;

// end; { If iLow <> iLow[1]... }

   
Plot1(Dynamic_R , "Resistance",    HighColor ) ;

Plot2(xFib5 , "fib5", iFib5Color ) ;

Plot3(xFib4 , "fib4", iFib4Color ) ;

Plot4(xFib3 , "fib3", iFib3Color ) ;

Plot5(xFib2 , "fib2", iFib2Color ) ;

Plot6(xFib1 , "fib1", iFib1Color ) ;

Plot7(Dynamic_S , "Support",   LowColor ) ;



end; // If date >= xStartDate


CommentaryCl( "Dynamic_R: ", NumToStr( Dynamic_R , iDecimals) );

CommentaryCl( "Dynamic_S: ", NumToStr( Dynamic_S , iDecimals) );
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: 15672
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3038
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri May 18, 2007 11:25 pm

{_TRO_TRAVEL_2}

Code: Select all

[LegacyColorValue = true];

{_TRO_TRAVEL_2}
      
{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.}


// xAppType = GetAppInfo(aiApplicationType);      // cUnknown = 0 cChart = 1  cRadarScreen = 2 cOptionStation = 3

 

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

var:

tAlert(""),

xAppType(0),
sFirstPass(true),
 
   DayTop( 0 ),
   DayBottom( 0 ),


FG1(white),
BG1(black),

fg2(white),
bg2(black),


fg3(white),
bg3(black),

fg4(white),
bg4(black),

xTravel(0),   
xTotalTravel(0),
xDailyRange(0),
xBeginPrice(0),
xRange(0),

xAvgTravel(0),
xADR(0),
xATR(0),
xMsg(""),

xCount(0),
xPct(0),
xTOPct(0),

numbars(0);



{first time through}

if sFirstPass
then begin

{ APP TYPE TEST }
 
sFirstPass = false;

xAppType = GetAppInfo(aiApplicationType);        // cUnknown = 0 cChart = 1  cRadarScreen = 2 cOptionStation = 3



end; {if sFirstPass}

{ INITIALIZE }

xMsg = "";

tAlert  = "";

FG1 = WHITE;
BG1 = BLACK;

fg2 = WHITE;
bg2 = BLACK;

fg3 = WHITE;
bg3 = BLACK;

fg4 = WHITE;
bg4 = BLACK;

{ calculations }

 
If d <> d[1]
then begin

   xTotalTravel    = 0 ;
   xBeginPrice = open ;
end ;



DayBottom  = minlist( Open , Close );
DayTop     = maxlist( Open , Close );

xTravel       = absvalue( close - open ) + ( 2 * ( high - DayTop ) ) + ( 2 * ( DayBottom - low ) ) ;
xTotalTravel = xTotalTravel + xTravel ;

xAvgTravel    = averagefc( xTravel, iLength ) ;

If xTotalTravel >= iThreshold
then begin
   
   FG1 = iThresholdColorFG;
   BG1 = iThresholdColorBG;

end;

xRange       = high - low ;
xDailyRange = highd(0) - lowd(0) ;

xADR      = _fAvgDailyRange(iLength);
xATR      = Average(TrueRange,iLength);

if xDailyRange > xADR
then begin
   
   FG2 = green;
   BG2 = black;

end;


if xBeginPrice <> 0
then begin
   xPct   = xTotalTravel / xDailyRange ;
   xTOPct   = xTotalTravel / dailyopen ;
end;

if xPct > iThresholdPct
then begin
   
   FG3 = green;
   BG3 = black;

end;


If close = highd(0)
   then tAlert = "Kiss High" ;

If close = lowd(0)
   then tAlert = "Kiss Low" ;


{ Alert }

if tAlert <> ""
   then Alert( tAlert ) ;


{ PLOT }


Plot1(xTotalTravel, "Total Travel", fg1) ;
SetPlotBGColor( 1, bg1);
   
Plot2(xDailyRange, "Total Range", fg2 ) ;
SetPlotBGColor( 2, bg2 );

if xAppType = 2
then begin
 Plot3(xPct, "TT/TR", fg3 ) ;
 SetPlotBGColor( 3, bg3 );

 Plot6(xTOPct, "TT/Open%", white ) ;
 SetPlotBGColor( 3, black );


end; 
    


Plot4(xTravel, "Travel", yellow) ;
SetPlotBGColor( 4, bg4);

   


Plot5(xRange, "Range", cyan) ;
SetPlotBGColor( 5, bg4);

Plot7(xAvgTravel, "AvgTravel", yellow) ;
SetPlotBGColor( 7, black );
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.

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


Return to “TheRumpledOne”