TTM Scalper? Aka, 3 Higher Lows/Highs

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

daedalus
rank: <50 posts
rank: <50 posts
Posts: 17
Joined: Thu Jul 12, 2007 6:07 pm
Reputation: 0
Gender: None specified

TTM Scalper? Aka, 3 Higher Lows/Highs

Postby daedalus » Fri Jul 27, 2007 10:44 pm

I've been unable to come up with a .eld that replicates this. I've searched this forum high and low and haven't seen anything quite like it. I understand its a fairly simple concept, but the indicator i found on traderslabratory.com is kind of screwy. Its been awhile since my C++ class, so I don't really know how to modify the code accordingly.

On the other thread, someone posted up saying that the code was incorrect and posted the correct logic (not in easy language). Can anyone convert them into an indicator or shoot me in the right direction if this is already part of the motherlode packages somewhere?

The Code from the other TL thread:

Code: Select all

inputs: BarWidth(3); variables: UpTrend(false), LowPainted(false), HighPainted(false), ExtremeBar(0), TriggerBarLow(0), ExtremeBarHigh(0), TriggerBarHigh(0), ExtremeBarLow(0), counter(-1); // Compare the 9-period MA to the previous bar's value as the basis for determining // if we are in an uptrend or a downtrend at this moment. // // We will NOT check for the presence of a trend if we are // "waiting for a confirmation of a trigger (i.e. Extreme Bar <> 0)" ?? //Downtrend -- Look to paint a low bar if (AverageFC(Close[3],9) < AverageFC(Close[4],9) and ExtremeBar=0) or ((AverageFC(Close[3],9) = AverageFC(Close[4],9) and ExtremeBar=0) and (UpTrend=False)) then begin UpTrend=False; HighPainted=false; if low[3] > low then LowPainted=false; end; //Uptrend -- Look to paint a high bar if AverageFC(Close[3],9) > AverageFC(Close[4],9) and ExtremeBar=0 or ((AverageFC(Close[3],9) = AverageFC(Close[4],9) and ExtremeBar=0) and (UpTrend=True)) then begin UpTrend=True; LowPainted=false; if high[3] < high then HighPainted=false; end; //Check for triggers and paint the extreme bar on confirmation //Uptrend if UpTrend = True and HighPainted=false then begin if high[2] < high[3] and ExtremeBar=0 then begin ExtremeBar = 3; ExtremeBarHigh = high[3]; TriggerBarLow = low[2]; end; if high[1] > ExtremeBarHigh then begin ExtremeBar = 0; ExtremeBarHigh = 0; TriggerBarLow = 0; counter=-1; end; if ExtremeBar <> 0 then counter=counter+1; // Paint an "Extreme Bar" if it exists based on the two if blocks above // OR if the earlier close was above the 8-EMA and the later close was // below the 8-EMA) if (close[1] < TriggerBarLow and ExtremeBar <> 0) // or ((Close[3] > XAverage(Close[3],8)) and (Close[1] < XAverage(Close[1],8))) then begin ExtremeBar = ExtremeBar + counter; PlotPaintBar[ExtremeBar](High[ExtremeBar],Low[ExtremeBar],"ScalperSig",white); SetPlotWidth[ExtremeBar](1,BarWidth); SetPlotColor[ExtremeBar](1,white); alert("Scalper Sell Detected!"); HighPainted = true; counter=-1; ExtremeBar=0; end; end; //Downtrend if UpTrend = False and LowPainted=false then begin if low[2] > low[3] and ExtremeBar=0 then begin ExtremeBar = 3; ExtremeBarLow = low[3]; TriggerBarHigh = high[2]; if ExtremeBarLow > low[4] then ExtremeBar = 4; end; if low[1] < ExtremeBarLow then begin ExtremeBar = 0; ExtremeBarLow = 0; TriggerBarHigh = 0; counter=-1; end; if ExtremeBar <> 0 then counter=counter+1; if close[1] > TriggerBarHigh and ExtremeBar <> 0 then begin ExtremeBar = ExtremeBar + counter; PlotPaintBar[ExtremeBar](Low[ExtremeBar],High[ExtremeBar],"ScalperSig",white); SetPlotWidth[ExtremeBar](1,BarWidth); SetPlotColor[ExtremeBar](1,white); alert("Scalper Buy Detected!"); LowPainted = true; counter=-1; ExtremeBar=0; end; end;


And the logic someone said was really how it needed to be coded (metastock code):



Code: Select all

I am new to easy language but have coded this in metastock below is the code.

The code for higher closes in the highlights Tab

BC:=C>Ref(C,-1) AND Ref(C,-1)>Ref(C,-2);

SC:=C<Ref(C,-1) AND Ref(C,-1)<Ref(C,-2);

X:=If(BC=1,1,If(SC=1,0,PREV));

Cross(X,0.5);


Here is the one for the lower closes:

BC:=C>Ref(C,-1) AND Ref(C,-1)>Ref(C,-2);

SC:=C<Ref(C,-1) AND Ref(C,-1)<Ref(C,-2);

X:=If(BC=1,1,If(SC=1,0,PREV));

Cross(0.5,X);



Thanks again for your help here! Its easy enough to do this manually, but a paintbar would simplify my life immensely!

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

Postby TheRumpledOne » Sat Jul 28, 2007 8:13 pm

My _SM_CANDLE2 indicator for radarscreen or _TRO_PMSM_HL will tell you if there are higher/lower highs/lows.
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.

daedalus
rank: <50 posts
rank: <50 posts
Posts: 17
Joined: Thu Jul 12, 2007 6:07 pm
Reputation: 0
Gender: None specified

Postby daedalus » Sun Jul 29, 2007 3:20 am

Thanks. If anyone is intrested I found an .eld that is an exact replica of the TTM indicator that was posted yesterday on TL.

http://www.traderslaboratory.com/forums ... -2124.html

Hope this helps anyone on here searching in the future, and TRO, thanks again!

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

Postby TheRumpledOne » Sun Jul 29, 2007 4:14 am

Thanks for posting that site.

Lots of free ELDs to download.

Never know what you might learn!
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.

vitovest
rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Sat May 27, 2006 6:44 pm
Reputation: 0
Gender: None specified

Postby vitovest » Mon Jul 30, 2007 3:16 pm

Anyone care to post the ELD here, I can't download from the site for some reason.

Thanks

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

Susana
rank: <50 posts
rank: <50 posts
Posts: 47
Joined: Mon Feb 19, 2007 3:17 pm
Reputation: 0
Gender: None specified

Postby Susana » Mon Jul 30, 2007 10:25 pm

Thank you but I did not find it useful. It's just a pivot reference, prints way after the fact. In this business such speed will kill you in the long run.

That's why I like TRO indicators, they report price action not something that happened 5 months ago :)

Susana

vitovest
rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Sat May 27, 2006 6:44 pm
Reputation: 0
Gender: None specified

Postby vitovest » Tue Jul 31, 2007 1:33 am

Susana wrote:Thank you but I did not find it useful. It's just a pivot reference, prints way after the fact. In this business such speed will kill you in the long run.

That's why I like TRO indicators, they report price action not something that happened 5 months ago :)

Susana
Susana,
to the contrary the TTM scalper adds to the "enhanced" Dynamic FibsSR that TRO posted with the Apple Peeler2. With the confluence of information for entry including some squiggles and Fib extensions for targets it works for me. my fav is EMA Cross over plays, with TRO's tools and the scalper it just adds to the confidence to take the trade.

vitovest
rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Sat May 27, 2006 6:44 pm
Reputation: 0
Gender: None specified

Postby vitovest » Tue Jul 31, 2007 1:35 am

BTW, I did get the TTM Scalper code

Susana
rank: <50 posts
rank: <50 posts
Posts: 47
Joined: Mon Feb 19, 2007 3:17 pm
Reputation: 0
Gender: None specified

Postby Susana » Tue Jul 31, 2007 1:36 am

Vito,

Can you please post some examples ?

Susana

daedalus
rank: <50 posts
rank: <50 posts
Posts: 17
Joined: Thu Jul 12, 2007 6:07 pm
Reputation: 0
Gender: None specified

Postby daedalus » Tue Jul 31, 2007 3:10 am

Susana wrote:Thank you but I did not find it useful. It's just a pivot reference, prints way after the fact. In this business such speed will kill you in the long run.

That's why I like TRO indicators, they report price action not something that happened 5 months ago :)

Susana


Yea, I don't use them for entry indicators, but I trade fib retracements and grids so they help "pull out" the more valid swing highs and lows of the major grids on my tick charts to make relevant grid drawings easier to spot.

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


Return to “beginners forum”