PureBytes Links
Trading Reference Links
|
I have been working on some ideas for defining a trend for use as
confirmation for entry signals. I am still working on it, but thought I
might add it here to see what others think of it. This is one way I am
trying, and is one of the 2 ways so far more successful than others.
Basically it is an indicator so far, and trend signified by the position of
the 2 lines, green above red is rising, red above green is falling.
As I said it is early days for this as yet
//INDICATOR C 2
//Trending
//by Graham Kavanagh 09 June 2003
Period1 = 40;
Period2 = 20;
Period3 = 5;
Rise = IIf(H>Ref(H,-1) AND L>Ref(L,-1),1,0);
Fall = IIf(H<Ref(H,-1) AND L<Ref(L,-1),1,0);
CountRise = Sum(Rise,Period1);
CountFall = Sum(Fall,Period1);
IndC = (CountRise-CountFall)/Period1*100;
MAIndC = DEMA(IndC,Period2);
Trigger = EMA(MAIndC,Period3);
Strengthup = MAindc - ValueWhen(Cross(maindc,trigger),MAindc);
Strengthdn = MAindc - ValueWhen(Cross(trigger,maindc),MAindc);
Strength = DEMA( (strengthup+strengthdn), period2 );
MAstrength = EMA(Strength,5);
GraphXSpace = 2;
mycolor=IIf(MAIndC>Trigger, colorGreen,
IIf(MAIndC<Trigger,colorRed,colorBlack));
Title =EncodeColor(SelectedValue(mycolor)) + Name() + " " + Date() + " Ind
C2 Trend Strength: Higher Highs & Lows - Lower Highs & Lows
"+WriteVal(strength,1.2);
Plot( strength, EncodeColor(colorGreen)+" trend Strength ", colorGreen,
styleLine+styleNoLabel);
Plot( mastrength, EncodeColor(colorRed)+" MA Strength ", colorRed,
styleLine+styleNoLabel);
Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia
-----Original Message-----
From: MarkF2 [mailto:feierstein@xxxxxxxxx]
Sent: Monday, 30 June 2003 8:52 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: proof of an uptrend
Ron- If you're going to use slopes, think of them as positive or negative.
Don't try to order them because they depend on scale and you'll get
incoherent rankings.
Depending on how you ultimately decide to define a trend and your timeframe,
you may also want to take an actuarial approach to look at how long trends
last. Of course there are no certainties, only probabilities.
Mark
--- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@xxxx> wrote:
> I am finally able to actually create some scans that work. Now I
want to add something to my buy scans that will insure that the stocks that
receive a buy arrow are actually in an uptrend. One idea I have is to
require that it's linear regression must be in an uptrend. I would
appreciate any and all suggestions regarding what criteria that I should put
into my buy scans that would insure that the stock is
truly in an uptrend, in order for it to be eligible to receive a buy
arrow. Regardless of the other suggestions that may be forthcoming,
I still want to test the concept of positive linear regression. I
have copied the information from HELP that I think is most relevant to what
I want to do. I am a little puzzled regarding what these
HELP comments are really saying. All that I am really looking for in this
post is the statements that I need to add to my buy scans that
will insure that the stock is truly in an uptrend. Any and all
comments will be appreciated. Ron D
>
>
>
>
>
> SYNTAX linregslope( ARRAY, periods )
> RETURNS ARRAY
> FUNCTION Calculates linear regression line slope from the
ARRAY using periods range.
> EXAMPLE x = Cum(1);
> lastx = LastValue( x ); Daysback = 10; aa = LastValue(
LinRegIntercept( Close, Daysback) );
> bb = LastValue( LinRegSlope( Close, Daysback ) );
>
> y = Aa + bb * ( x - (Lastx - DaysBack) ); Plot( Close,
"Close", colorBlack, styleCandle );
> Plot( IIf( x >= (lastx - Daysback), y, -1e10 ), "LinReg",
colorRed );
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get
A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|