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

[amibroker] Re: Coding problem



PureBytes Links

Trading Reference Links

A kiss may be promissing [when we stay close BEFORE and AFTER the 
kiss] or sharp [something like kiss AND good-bye].
See if the following helps.

x=RSI();
Level=50;
distance=5;
Cond1=Ref(x,-1)<50 AND Ref(x,-1)==HHV(x,3) AND Min(x,Ref(x,-2))>Level-
distance;
Cond2=Ref(x,-1)<50 AND Ref(x,-1)==HHV(x,3) AND Ref(x,-2)>Level-
distance AND NOT(Cond1);
Plot(x,"x",colorGreen,8);
Plot(Level,"Level",1,1);
Plot(Level-distance,"L-d",Cum(1)%2,1);
PlotShapes(shapeUpTriangle*Ref(Cond1,1),colorBlue);
PlotShapes(shapeDownTriangle*Ref(Cond2,1),colorRed);

Both conditions are valuable for the dangerous whipsaw description.
Similar condition may describe a kiss from above.
Cross() does not specify how close were the previous and the next 
point [an RSI, for example, may jump from 30 to 60 in one day, a cross
(RSI(),50) would not be descriptive enough.
Dimitris Tsokakis


--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <wd78@xxxx> wrote:
> Hi:
> 
> Would appreciate it if someone could put me on the right track.  I 
am trying
> to code the condition where an indicator "kisses" a specific 
level.  By
> "kisses" I mean touches and then reverses.  Of course, one would 
have to
> specify a range, as opposed to a specific level, in which the kiss 
is in
> play.  Ideally, a "Kiss" function similar to Cross would be great.
> 
> Thanks.
> 
> Bill


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/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/