_tro_dynamic_srbounce
Moderator: moderators
_tro_dynamic_srbounce
can some one help to find the explanation off this indicator?
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
- TheRumpledOne
- rank: 10000+ posts
- Posts: 15558
- Joined: Sun May 14, 2006 9:31 pm
- Reputation: 3035
- Location: Oregon
- Real name: Avery T. Horton, Jr.
- Gender:
- Contact:
dynamic bounc
see i am sure
dynamic bounc
[code]
[LegacyColorValue = true];
{ _TRO_Dynamic_SRBounc }
{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(2),
iMode("No"), { if "auto" code sets xPeriods, if not "auto" code uses iPeriods}
iDefault(false), // if true then load defaults from _fDYNAMIC_SR
iPeriods(05),
iResetSR(true), // if true reset dynamic s/r, if false don't for Forex use false!!
iStartDate(1070101), // if not intraday, date to start counting
iShowSR(false), // if true then display SR values
HighColor( red),
LowColor( blue);
variables:
xAppType(0), // cUnknown = 0 cChart = 1 cRadarScreen = 2 cOptionStation = 3
tTrade(""),
xTicker(GetSymbolName),
xDecimals(4),
xPriceThreshold(0),
xWidthThreshold(0),
xChannelBars(0),
xStartDate(iStartDate), // if not intraday, date to start counting
oExtremeVal( 0 ),
oExtremeBar( 0 ) ,
xBars( 0 ),
xOldPeriods(0),
xPeriods(05),
xInterval(0),
sFirstPass(true),
HavePrevLines( false ),
TLHigh( 0 ),
TLLow( 0 ),
Dynamic_R( 0 ),
Dynamic_S( 0 ),
OldDynamic_R( 0 ),
OldDynamic_S( 0 ),
PrevDynamic_R( 0 ),
PrevDynamic_S( 0 ) ;
variables:
FG1(black),
BG1(white),
fg2(black),
bg2(white),
fg3(white),
bg3(black),
fg4(white),
bg4(black),
Dynamic_UpVol( 0 ),
Dynamic_DnVol( 0 ) ,
PrevDynamic_UpVol( 0 ),
PrevDynamic_DnVol( 0 ) ;
{first time through}
if sFirstPass
then begin
sFirstPass = false;
xAppType = GetAppInfo(aiApplicationType); // cUnknown = 0 cChart = 1 cRadarScreen = 2 cOptionStation = 3
{mode test}
If iMode <> "Auto" and iMode <> "auto" and iMode <> "AUTO"
then xPeriods = iPeriods
else xPeriods = _fPushPeriods(xInterval);
{bar test}
If bartype = 4 // monthly
then begin
xInterval = 94;
xPeriods = 12;
end
else
If bartype = 3 // weekly
then begin
xInterval = 93;
xPeriods = 52;
end
else
If bartype = 2 // daily
then begin
xInterval = 92;
end
else
If bartype = 1 // intraday
then begin
xInterval = BarInterval;
end; { If bartype = 1 }
If iDefault
then begin
value1 = _fDynamic_SR_Load( xTicker, xPeriods , xDecimals , xPriceThreshold , xWidthThreshold , xChannelBars ) ;
end
else begin
xPeriods = iPeriods ;
end;
xOldPeriods = xPeriods ; // save this value
xStartDate = iStartDate ;
end; {if sFirstPass}
{ PROCESSING }
tTrade = "WAIT - T";
FG1 = WHITE;
BG1 = lightgray;
fg2 = WHITE;
bg2 = lightgray;
fg3 = yellow;
bg3 = black;
fg4 = black;
bg4 = lightgray;
If date this bar >= xStartDate
then begin
{save old values}
If Dynamic_R <> PrevDynamic_R
then OldDynamic_R = PrevDynamic_R;
If Dynamic_S <> PrevDynamic_S
then OldDynamic_S = PrevDynamic_S ;
OldDynamic_R = PrevDynamic_R ;
OldDynamic_S = PrevDynamic_S ;
PrevDynamic_R = Dynamic_R ;
PrevDynamic_S = Dynamic_S ;
{ high / low for period }
If d <> d[1]
then xBars = 0;
xBars = xBars + 1;
If xBars < xOldPeriods
and iResetSR
and xInterval < 92
then begin
xPeriods = xBars ; // start fresh each day
PrevDynamic_S = L ;
PrevDynamic_R = H ;
end
else begin
xPeriods = xOldPeriods ; // no reset
end;
oExtremeVal = Extremes( L, xPeriods, -1, Dynamic_S , oExtremeBar ) ; // lowest low
oExtremeVal = Extremes( H, xPeriods, 1, Dynamic_R , oExtremeBar ) ; // highest high
If Dynamic_R <> H
and Dynamic_R < PrevDynamic_R
then if PrevDynamic_R <> 0
then Dynamic_R = PrevDynamic_R;
If Dynamic_S <> L
and Dynamic_S > PrevDynamic_S
then if PrevDynamic_S <> 0
then Dynamic_S = PrevDynamic_S;
If Dynamic_S = Dynamic_S[1]
then begin
FG1 = blue;
// BG1 = BLACK;
end
else begin
FG1 = LowColor ;
// BG1 = BLACK;
end ;
If Dynamic_R = Dynamic_R[1]
then begin
FG2 = RED;
// BG2 = BLACK;
end
else begin
FG2 = HighColor ;
// BG2 = BLACK;
end ;
If low[2] = Dynamic_S[2]
then begin
FG3 = green;
tTrade = "WAIT - B";
end
else
If HIGH[2] = Dynamic_R[2]
then begin
FG3 = red;
tTrade = "WAIT - S";
end;
If low[1] = Dynamic_S[1]
and high > high[1]
then begin
FG4 = green;
FG3 = darkgreen;
BG3 = white;
tTrade = "BUY";
end
else
If HIGH[1] = Dynamic_R[1]
and low < low[1]
then begin
FG4 = red;
FG3 = red;
BG3 = white;
tTrade = "SHORT";
end;
if low = Dynamic_S
then bg1 = white
else if high = Dynamic_R
then bg2 = white;
{ plots }
{
if iShowSR
then begin
plot1(Dynamic_S, "Support", FG1 ) ;
SetPlotBGColor( 1, bg1);
plot2(Dynamic_R, "Resistance", FG2 ) ;
SetPlotBGColor( 2, bg2);
end;
}
if xAppType = 2
then begin
plot3( tTrade, "TRADE", FG3 ) ;
SetPlotBGColor( 3, bg3);
end ;
end; // If date >= xStartDate
if xAppType = 1
then begin
Plot4( -1 , "PMSM", fg4 ) ;
SetPlotBGColor( 4, bg4 );
end ;
CommentaryCl( "Dynamic_S: ", NumToStr( Dynamic_S , iDecimals) );
CommentaryCl( "Dynamic_R: ", NumToStr( Dynamic_R , iDecimals) );
[LegacyColorValue = true];
{ _TRO_Dynamic_SRBounc }
{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(2),
iMode("No"), { if "auto" code sets xPeriods, if not "auto" code uses iPeriods}
iDefault(false), // if true then load defaults from _fDYNAMIC_SR
iPeriods(05),
iResetSR(true), // if true reset dynamic s/r, if false don't for Forex use false!!
iStartDate(1070101), // if not intraday, date to start counting
iShowSR(false), // if true then display SR values
HighColor( red),
LowColor( blue);
variables:
xAppType(0), // cUnknown = 0 cChart = 1 cRadarScreen = 2 cOptionStation = 3
tTrade(""),
xTicker(GetSymbolName),
xDecimals(4),
xPriceThreshold(0),
xWidthThreshold(0),
xChannelBars(0),
xStartDate(iStartDate), // if not intraday, date to start counting
oExtremeVal( 0 ),
oExtremeBar( 0 ) ,
xBars( 0 ),
xOldPeriods(0),
xPeriods(05),
xInterval(0),
sFirstPass(true),
HavePrevLines( false ),
TLHigh( 0 ),
TLLow( 0 ),
Dynamic_R( 0 ),
Dynamic_S( 0 ),
OldDynamic_R( 0 ),
OldDynamic_S( 0 ),
PrevDynamic_R( 0 ),
PrevDynamic_S( 0 ) ;
variables:
FG1(black),
BG1(white),
fg2(black),
bg2(white),
fg3(white),
bg3(black),
fg4(white),
bg4(black),
Dynamic_UpVol( 0 ),
Dynamic_DnVol( 0 ) ,
PrevDynamic_UpVol( 0 ),
PrevDynamic_DnVol( 0 ) ;
{first time through}
if sFirstPass
then begin
sFirstPass = false;
xAppType = GetAppInfo(aiApplicationType); // cUnknown = 0 cChart = 1 cRadarScreen = 2 cOptionStation = 3
{mode test}
If iMode <> "Auto" and iMode <> "auto" and iMode <> "AUTO"
then xPeriods = iPeriods
else xPeriods = _fPushPeriods(xInterval);
{bar test}
If bartype = 4 // monthly
then begin
xInterval = 94;
xPeriods = 12;
end
else
If bartype = 3 // weekly
then begin
xInterval = 93;
xPeriods = 52;
end
else
If bartype = 2 // daily
then begin
xInterval = 92;
end
else
If bartype = 1 // intraday
then begin
xInterval = BarInterval;
end; { If bartype = 1 }
If iDefault
then begin
value1 = _fDynamic_SR_Load( xTicker, xPeriods , xDecimals , xPriceThreshold , xWidthThreshold , xChannelBars ) ;
end
else begin
xPeriods = iPeriods ;
end;
xOldPeriods = xPeriods ; // save this value
xStartDate = iStartDate ;
end; {if sFirstPass}
{ PROCESSING }
tTrade = "WAIT - T";
FG1 = WHITE;
BG1 = lightgray;
fg2 = WHITE;
bg2 = lightgray;
fg3 = yellow;
bg3 = black;
fg4 = black;
bg4 = lightgray;
If date this bar >= xStartDate
then begin
{save old values}
If Dynamic_R <> PrevDynamic_R
then OldDynamic_R = PrevDynamic_R;
If Dynamic_S <> PrevDynamic_S
then OldDynamic_S = PrevDynamic_S ;
OldDynamic_R = PrevDynamic_R ;
OldDynamic_S = PrevDynamic_S ;
PrevDynamic_R = Dynamic_R ;
PrevDynamic_S = Dynamic_S ;
{ high / low for period }
If d <> d[1]
then xBars = 0;
xBars = xBars + 1;
If xBars < xOldPeriods
and iResetSR
and xInterval < 92
then begin
xPeriods = xBars ; // start fresh each day
PrevDynamic_S = L ;
PrevDynamic_R = H ;
end
else begin
xPeriods = xOldPeriods ; // no reset
end;
oExtremeVal = Extremes( L, xPeriods, -1, Dynamic_S , oExtremeBar ) ; // lowest low
oExtremeVal = Extremes( H, xPeriods, 1, Dynamic_R , oExtremeBar ) ; // highest high
If Dynamic_R <> H
and Dynamic_R < PrevDynamic_R
then if PrevDynamic_R <> 0
then Dynamic_R = PrevDynamic_R;
If Dynamic_S <> L
and Dynamic_S > PrevDynamic_S
then if PrevDynamic_S <> 0
then Dynamic_S = PrevDynamic_S;
If Dynamic_S = Dynamic_S[1]
then begin
FG1 = blue;
// BG1 = BLACK;
end
else begin
FG1 = LowColor ;
// BG1 = BLACK;
end ;
If Dynamic_R = Dynamic_R[1]
then begin
FG2 = RED;
// BG2 = BLACK;
end
else begin
FG2 = HighColor ;
// BG2 = BLACK;
end ;
If low[2] = Dynamic_S[2]
then begin
FG3 = green;
tTrade = "WAIT - B";
end
else
If HIGH[2] = Dynamic_R[2]
then begin
FG3 = red;
tTrade = "WAIT - S";
end;
If low[1] = Dynamic_S[1]
and high > high[1]
then begin
FG4 = green;
FG3 = darkgreen;
BG3 = white;
tTrade = "BUY";
end
else
If HIGH[1] = Dynamic_R[1]
and low < low[1]
then begin
FG4 = red;
FG3 = red;
BG3 = white;
tTrade = "SHORT";
end;
if low = Dynamic_S
then bg1 = white
else if high = Dynamic_R
then bg2 = white;
{ plots }
{
if iShowSR
then begin
plot1(Dynamic_S, "Support", FG1 ) ;
SetPlotBGColor( 1, bg1);
plot2(Dynamic_R, "Resistance", FG2 ) ;
SetPlotBGColor( 2, bg2);
end;
}
if xAppType = 2
then begin
plot3( tTrade, "TRADE", FG3 ) ;
SetPlotBGColor( 3, bg3);
end ;
end; // If date >= xStartDate
if xAppType = 1
then begin
Plot4( -1 , "PMSM", fg4 ) ;
SetPlotBGColor( 4, bg4 );
end ;
CommentaryCl( "Dynamic_S: ", NumToStr( Dynamic_S , iDecimals) );
CommentaryCl( "Dynamic_R: ", NumToStr( Dynamic_R , iDecimals) );
-
- rank: 50+ posts
- Posts: 59
- Joined: Tue Jan 08, 2008 2:32 pm
- Reputation: 0
- Location: San Diego, CA
- Gender:
werner,
The El code looks like a modified version of one of the _TRO_Dynamic_Range indicators. The S&R points are plotted in a sub-graph window instead of above and below the candles. It looks to me like someone used part of TRO's code and modified it to their liking. I would bet that TRO's EL code is modified by thousands of traders as it is so eloquently written.
The El code looks like a modified version of one of the _TRO_Dynamic_Range indicators. The S&R points are plotted in a sub-graph window instead of above and below the candles. It looks to me like someone used part of TRO's code and modified it to their liking. I would bet that TRO's EL code is modified by thousands of traders as it is so eloquently written.
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
-
- rank: 50+ posts
- Posts: 59
- Joined: Tue Jan 08, 2008 2:32 pm
- Reputation: 0
- Location: San Diego, CA
- Gender:
- TheRumpledOne
- rank: 10000+ posts
- Posts: 15558
- Joined: Sun May 14, 2006 9:31 pm
- Reputation: 3035
- Location: Oregon
- Real name: Avery T. Horton, Jr.
- Gender:
- Contact:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.