[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: lower highs, lower lows



PureBytes Links

Trading Reference Links

I'm really not the one qualified to answer this but how are you going
to tell it to do X if it's true or Y if it isn't?

Dominick





--- In amibroker@xxxxxxxxxxxxxxx, "Al Venosa" <advenosa@xxxx> wrote:
> MessageGraham:
> 
> I've noticed you and lots of other folks on this board seemingly
unnecessarily use the iif statement a lot, as in your Rise and Fall
code lines below. Yet, isn't it just as correct and less code (i.e.,
more efficient) to simply write:
> 
> Rise = H>Ref(H,-1) AND L>Ref(L,-1);
> 
> Just curious why people use iif so much. Thanks.
> 
> Al Venosa
>   ----- Original Message ----- 
>   From: Graham 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, July 17, 2003 3:10 AM
>   Subject: RE: [amibroker] lower highs, lower lows
> 
> 
>   I recently posted an indicator which could be roughly what you are
looking for, at least for the trend identifiaction. I will post
another version of what I am doing, and see if it can be modified to
get what you want
>   Can't remember which one I posted, but here is latest of this
particular strain of my fumblings
>   //INDICATOR C 2
> 
>   //Momentum
> 
>   //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(period1,1)+"/"+WriteVal(period1,2)+"/"+WriteVal(period3,1);
> 
>   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: mrdavis9 [mailto:mrdavis9@x...] 
>     Sent: Thursday, 17 July 2003 2:52 PM
>     To: amibrokeryahoogroups
>     Cc: jeff davis
>     Subject: [amibroker] lower highs, lower lows
> 
> 
>     A lot of traders are expecting the markets to turn down any day
now, so I made an CRUDE AA scan that is designed to find stocks that
have been trending up for awhile,  but which have recently started
trending  down.   Although I have posted the code  below, I am not
looking  for suggestions for improving this CRUDE scan.   I am still
struggling with AFL, so I am not yet able to create the AA scan that
will look for exactly the conditions that I want to scan for.    I
really want  a  scan that will find  those symbols that meet the
Weinstein  definition of the ending of an uptrend and the entering of
a downtrend.   I am aware that DT is a little suspicious of Weinstein
because he wears a ring on his pinkie.  It bothers me a little also,
but at least he doesn't wear a ring in his nose, at least not yet, as
far as I know .   I am thinking that a lot of Amibroker users would
like to have a scan which will find the conditions which are 
necessary for finding a Weinstein change from uptrend to downtrend.  
My understanding of Weinstein trends is that after a series of higher
highs and higher lows, we suddenly see a lower low, then we need to be
worried.  After the appearance of this first lower low, we need to
keep watching till the next high occurs.  If this next high is lower
than the previous high, then we are officially in a Weinstein
downtrend.   The attached chart that resulted from my CRUDE coding is
approximately the kind of results that will result from a precise
coding of the Weinstein change of trend definition.  Since an AA scan
for these Weinstein change of trend conditions will  be useful to a
lot of Amibroker users, I would greatly appreciate it if some
experienced Amibroker coders would post the code for that looks for
these precise condtions.  Ron D 
>     itema=C; 
> 
>     Sell= MA(itema,40)>=MA(itema,20) AND MA(itema,5)<=MA(itema,10)/*
AND MA(itema,10)>= MA(itema,4) AND MA(itema,4)>= MA(itema,5) AND
MA(itema,5)>=MA(itema,6)AND MA(itema,6)>=MA(itema,7) AND
MA(itema,7)>=MA(itema,9) AND MA(itema,10) >= MA(itema,12) AND
MA(itema,20)>=MA(itema,10) */AND
Ref(Cross(StochD(14),StochK(14)),-1);/* AND StochK(14)>=80; */
> 
>     Buy=(0);
> 
>     PlotShapes( shapeUpArrow * Buy + shapeDownArrow * Sell, IIf(
Buy, colorGreen, colorRed ) )
> 
> 
> 
>     Send BUG REPORTS to bugs@xxxx
>     Send SUGGESTIONS to suggest@xxxx
>     -----------------------------------------
>     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 the Yahoo! Terms of
Service. 
> 
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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 the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/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/