| Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL. |
![]() | | Tweet | |
Klinger-Goslin ATR Indicator Details »» | |||||||||||||||||||||||||||||||
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
Screenshots Show Your Support
| |||||||||||||||||||||||||||||||
| The Following 4 Users Say Thank You to simterann22 For This Useful Post: | ||
| Comments |
| | #10 | ||
![]() | Re: Klinger-Goslin ATR Indicator { 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 | ||
| |
|
| The Following User Says Thank You to estate1997 For This Useful Post: | ||
Tams (05-29-2010) | ||
![]() |
| Thread Tools | |
| 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 |