Welcome to the Traders Laboratory Forums.
Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL.

Reply
Klinger-Goslin ATR Indicator Details »»
Klinger-Goslin ATR Indicator
Platform: 8.6, by simterann22 simterann22 is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Platform: Tradestation Rating:
Released: 07-01-2009 Last Update: Never Installs: 5
Re-useable Code  
No support by the author.

Here is a 'squeeze-like' indicator I converted from some very good code. Trend39 from the TS forums converted the Klinger and Goslin together adding an ATR factor to it.

Here are the links to the originals:

http://www.tradestation.com/Discussi...Topic_ID=26841
http://www.tradestation.com/Discussi...Topic_ID=26605
http://www.tradestation.com/Discussi...Topic_ID=37624


Code:
[LegacyColorValue = true]; 

{_KlingerVolume Function}


{KlingerOsc}
value1 = KVO_rd(34, 55);
value2 = Summation(value1, 1);

if 1 <= 1 then begin
	_KlingerVol = value1; end
else _KlingerVol = value2;
Code:
{KVO Function}

Inputs: 
   FastX(Numeric), 
   SlowX(Numeric); 
Vars: 
   FXAvg(0), 
   SXAvg(0);

FXAvg = XAverage(VForce_rd, FastX);
SXAvg = XAverage(VForce_rd, SlowX);  {Samll change made to Vforce_rd to make volume smaller)}
KVO_rd = (FXAvg - SXAvg);
Code:
{V-Force Function}

Vars: TSum(0), Trend(0), DM(0), CM(0); 
TSum = High + Low + Close; 
DM = High - low;

IF TSum > TSum[1] Then
Trend = 1
Else
Trend = -1;

IF Trend = Trend[1] Then
CM = CM + Range
Else
CM = Range + Range[1];
IF CM <> 0 Then
VForce_rd = Volume * AbsValue(2 * (DM/CM) -1) * Trend * 0.01;   {0.01 works great too; original version had * 100.   
Made smaller to decrease the plotted size of volume}

Code:
[LegacyColorValue = true]; 
{Volume Flow Indicator + Klinger Volume Indicator + ATR Summation

Trend39 compiled into one indicator

Simterann22 made changes below:Zeroline turns red when Klinger is below trigger line and green when above trigger line.
Klinger Histogram shows volume increasing or decreasing}

Inputs:
	ATRLength(21),
	Trigger(13),
	SmoothATR(1),
	Smooth(5),
	UpVolColor(green),
	UpVolColor2(darkGreen),
	DnVolColor(red),
	DnVolColor2(darkRed);

value1= summationif(close > open,truerange,ATRlength);
value2=summationif(close < open,truerange,ATRlength);
value3= value1-value2; {Sum}
value4 = average(value3,SmoothATR)*.5;


value5= Average((_KlingerVol+ Value4)*1/2,Smooth);
plot1(0,"Zero line");
plot98(0,"Zero Line BG");//Aesthetic
plot2(value5,"Klinger+ATR");
plot3 (average(value5,Trigger),"Trigger");

//Histogram
	
If Plot2>0 and Plot2>Plot2[1] then
	setplotcolor(2,UpVolColor);
If Plot2<0 and Plot2>Plot2[1] then
	setplotcolor(2,DnVolColor2);
If Plot2<0 and Plot2<PLot2[1] then
	setplotcolor(2,DnVolColor);
If Plot2>0 and Plot2<PLot2[1] then
	setplotcolor(2,UpVolColor2);


//ZeroLine
	
If plot2>plot3 then
	begin
	setplotcolor(1,UpVolColor);
	setplotcolor(98,UpVolColor2);//aesthetic only: must plot thicker and darker color than plot1
	end;
If plot2<plot3 then
	begin
	setplotcolor(1,DnVolColor);
	setplotcolor(98,DnVolColor2);//aesthetic only: must plot thicker and darker color than plot1
	end;

Download Now

File Type: eld @SK_KLINGER GOSLIN ATR.ELD (7.3 KB, 179 views)
File Type: pdf TradeStation Forum - Klinger Oscillator.pdf (1.27 MB, 207 views)
File Type: pdf TradeStation Forum -KLINGER VOLUME.pdf (14.72 MB, 182 views)

Screenshots

Klinger-Goslin ATR Indicator-klinger-goslin-atr.jpg  

Show Your Support

  • If you like to thanks you by the author -> Click Thanks to the Author
  • This modification may not be copied, reproduced or published elsewhere without the author's permission.
The Following 4 Users Say Thank You to simterann22 For This Useful Post:
aaa (07-05-2009), kh_model (07-02-2009), sunilrohira (07-05-2009), Tams (07-01-2009)

Comments
Old 08-30-2009, 10:55 PM   #10

Join Date: Jul 2009
Location: Orlando
Posts: 39
Ignore this user

Thanks: 17
Thanked 11 Times in 11 Posts

Re: Klinger-Goslin ATR Indicator

Use this. Go to File/new/window/easy lang/indicator and then past this.

{ Klinger+ATR Bollinger Band
Source: tradestation.com/Discussions/Topic.aspx?Topic_ID=5 9409&PAGE=3?? }
Inputs:
ATRLength(10),
Trigger(13),
UpColor(green),
DwnColor(magenta),
BandColor(Blue),
SmoothATR(1),
Smooth(1),

LengthBB( 20 ),
NumDevsUp( 2 ),
NumDevsDn( -2 ),
Displace( 0 ) ;

variables:
PriceBB(0),
Avg( 0 ),
SDev( 0 ),
LowerBand( 0 ),
UpperBand( 0 ) ;

PriceBB = (Average((_KlingerVol+ Value4)*1/2,Smooth));

Avg = AverageFC( PriceBB, LengthBB ) ;
SDev = StandardDev( PriceBB, LengthBB, 1 ) ;
UpperBand = Avg + NumDevsUp * SDev ;
LowerBand = Avg + NumDevsDn * SDev ;

value1= summationif(close > open,truerange,ATRlength) ;
value2= summationif(close < open,truerange,ATRlength) ;
value3= value1-value2; {Sum}
value4= average(value3,SmoothATR) *.5;
value5= Average((_KlingerVol+ Value4)*1/2,Smooth);

If Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin


plot1(value5,"Klinger+ATR ");
plot2 (0, "Zero Line");
Plot3[Displace]( LowerBand, "LowerBand", BandColor ) ;
Plot4[Displace]( UpperBand, "UpperBand", BandColor ) ;
Plot5[Displace]( Avg, "MidLine" ) ; end;

If Plot1>Plot1[1] then begin
plot1[1](Plot1[1],"Klinger+ATR",upcolor );
plot1(Plot1,"Klinger+ATR" ,upcolor);
end else begin

If plot1<plot1[1]then begin
plot1[1](Plot1[1],"Klinger+ATR",dwncolo r);
plot1(Plot1,"Klinger+ATR" ,dwncolor);
end; end;

If plot1>Plot2 then begin
plot2[1](plot2[1],"Zero Line",GREEN);
plot2(plot2,"Zero Line",Green);
end else begin
if plot1<plot2 then begin
plot2[1](plot2[1],"Zero Line",red);
plot2(plot2,"Zero Line",red); end; end;
This was poster by a really nice doctor.
I could use some help converting a long strategy from this into a short strategy. It is awesome.

Trade with the trend
estate1997 is offline  
Reply With Quote
The Following User Says Thank You to estate1997 For This Useful Post:
Tams (05-29-2010)

Reply

Thread Tools
Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indicator with Data of Another Indicator Tresor Coding Forum 13 08-06-2008 10:48 AM

All times are GMT -4. The time now is 10:57 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.