Jump to content

(Req) Topdog Trading indicators Suite1&2


Recommended Posts

  • 3 weeks later...
  • 4 months later...
  • 4 weeks later...
I have this for Tradestation I did coded Stochastic, MACD, and MA 50 change color as picture show if there any who know more about easy language for Tradestation we can make all Indi as TOPDog has. I like his strategy coz is simple and good :) still learning but one day i'll get my goal. http://img193.imageshack.us/img193/8925/tsindi.jpg
Link to comment
Share on other sites

  • 2 weeks later...

MACD code:

 

inputs:

FastLength( 5 ),

SlowLength( 20 ),

MACDLength( 30 ),

UpColor(magenta),

DwnColor(White),

flColor(red),

MomUpColor(green),

MomDwnColor(red) ;

 

 

 

variables:

MyMACD( 0 ),

MACDAvg( 0 ),

MACDDiff( 0 ) ;

 

 

 

MyMACD = MACD( Close, FastLength, SlowLength ) ;

MACDAvg = XAverage( MyMACD, MACDLength ) ;

MACDDiff = MyMACD - MACDAvg ;

 

 

 

 

Plot1( MyMACD, "MACD" ) ;

Plot2( MACDAvg, "MACDAvg" ) ;

Plot3( MACDDiff, "MACDDiff" ) ;

Plot4( 0, "ZeroLine" ) ;

 

 

 

If MACDAvg>MACDAvg[1] then begin

plot2[1](MACDAvg[1],"MACDAvg",upcolor);

plot2(MACDAvg,"MACDAvg",upcolor);

end else begin

plot2[1](MACDAvg[1],"MACDAvg",dwncolor);

plot2(MACDAvg,"MACDAvg",dwncolor);

end;

 

If MyMACD>MyMACD[1] then begin

plot1[1](MyMACD[1],"MACD",MOMupcolor);

plot1(MyMACD,"MACD",MOMupcolor);

end else begin

plot1[1](MyMACD[1],"MACD",MOMdwncolor);

plot1(MyMACD,"MACD",MOMdwncolor);

end;

 

{ Alert criteria }

if MACDDiff crosses over 0 then

Alert( "Bullish alert" )

else if MACDDiff crosses under 0 then

Alert( "Bearish alert" ) ;

Link to comment
Share on other sites

Stochastic slow code:

 

inputs:

PriceH( High ),

PriceL( Low ),

PriceC( Close ),

UpColor(green),

DwnColor(red),

StochLength( 5 ),

SmoothingLength1( 2 ), { used to slow FastK to FastD = SlowK }

SmoothingLength2( 3 ), { used to slow FastD to SlowD }

SmoothingType( 1 ), { pass in 1 for Original, 2 for Legacy }

OverSold( 20 ),

HorLine( 50 ),

OverBought( 80 ) ;

 

variables:

oFastK( 0 ),

oFastD( 0 ),

oSlowK( 0 ),

oSlowD( 0 ) ;

 

Value1 = Stochastic( PriceH, PriceL, PriceC, StochLength, SmoothingLength1, SmoothingLength2,

SmoothingType, oFastK, oFastD, oSlowK, oSlowD ) ;

 

 

Plot1( oSlowK, "SlowK" ) ;

Plot2( oSlowD, "SlowD" );

Plot3( OverBought, "OverBot" ) ;

Plot4( OverSold, "OverSld" ) ;

Plot5( HorLine, "HorLne" ) ;

 

 

If oSlowD>oSlowD[1] then begin

plot2[1](oSlowD[1],"SlowD",upcolor);

plot2(oSlowD,"SlowD",upcolor);

end else begin

plot2[1](oSlowD[1],"SlowD",dwncolor);

plot2(oSlowD,"SlowD",dwncolor);

end;

 

 

{ Alert criteria }

if CurrentBar > 2 then

begin

if oSlowK crosses over oSlowD and oSlowK < OverSold then { CB > 2 check used to

avoid spurious cross confirmation at CB = 2 (at CB = 1, MySlowK and MySlowD will

be the same) }

Alert( "SlowK crossing over SlowD" )

else if oSlowK crosses under oSlowD and oSlowK > OverBought then

Alert( "SlowK crossing under SlowD" ) ;

end ;

Link to comment
Share on other sites

Mov Avg 3 lines:

inputs:

UpColor(green),

DwnColor(red),

flatcolor(white),

Price( Close ),

FastLength( 4 ),

MedLength( 9 ),

SlowLength( 18 ),

Displace( 0 ) ;

 

variables:

FastAvg( 0 ),

MedAvg( 0 ),

SlowAvg( 0 ) ;

 

FastAvg = AverageFC( Price, FastLength ) ;

MedAvg = AverageFC( Price, MedLength ) ;

SlowAvg = AverageFC( Price, SlowLength ) ;

 

if Displace >= 0 or CurrentBar > AbsValue( Displace ) then

begin

 

 

Plot1[Displace]( FastAvg, "FastAvg" ) ;

Plot2[Displace]( MedAvg, "MedAvg" ) ;

Plot3[Displace]( SlowAvg, "SlowAvg" ) ;

 

If FastAvg>FastAvg[1] then begin

plot1[1](FastAvg[1],"FastAvg",upcolor);

plot1(FastAvg,"FastAvg",upcolor);

end else begin

If FastAvg=FastAvg[1] then begin

plot1[1](FastAvg[1],"FastAvg",flatcolor);

plot1(FastAvg,"FastAvg",flatcolor);

end else begin

plot1[1](FastAvg[1],"FastAvg",dwncolor);

plot1(FastAvg,"FastAvg",dwncolor);

end;

end;

 

 

 

{ Alert criteria }

if Displace <= 0 then

begin

Condition1 = Price > FastAvg and FastAvg > MedAvg and MedAvg > SlowAvg ;

if Condition1 and Condition1[1] = false then

Alert( "Bullish alert" )

else

begin

Condition2 = Price < FastAvg and FastAvg < MedAvg and MedAvg < SlowAvg ;

if Condition2 and Condition2[1] = false then

Alert( "Bearish alert" ) ;

end ;

end ;

end ;

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...