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

[amibroker] Re: TJ: A question about COND function



PureBytes Links

Trading Reference Links

Hi, Jayson
Let me explain what I'm trying to do:
I try to set up a condition as:
The MACD line crosses below the MACD signal FOR THE FIRST TIME
SINCE the signal has crossed above zero.This crossing Line/signal may 
have take place yesterday OR the day before yesterday. 
That's what I want in french- or in english, sorry!
But- forget the graphical point of view- I use this in explo only....
And the results I've got using the formula don't take into account 
the second part of this formula( OR Ref( etc): I've got the same list 
of stocks with or without the second part of the assertion; to get 
the list of stocks with MACD/ LINE crossing that occured the day 
before yesterday, I must rewrite and re explore with only the second 
part of the condition...Of course I try to do this in one shot!
Did I make myself clear?
Thanks anyway for showing interest in my little challenge!
Friendly,
Gilles









--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Gilles,
> It is doing as you ask. Note your yellow arrows all run in pairs. 
the first
> being the actual cross then the second occurring exactly one bar 
after. The
> second arrow coincides with the OR part of your condition........
> 
> 
> 
> The blue circle is the cross of cond2 and the red arrow is the 
cross of G.
> Since you  have prohibited further plotting of cond "G" until the 
next
> occurrence of cond2 you must wait until the sig line again crosses 
up from
> 0. to see this work in AA simply comment out your exrem version of 
cond 1
> and 2, set your n last days to a couple of hundred bars and run 
explore. You
> will see each of your yellow arrows accounted for...
> 
> Regards,
> Jayson
> -----Original Message-----
> From: gillesdeprez [mailto:gillesdeprez@x...]
> Sent: Saturday, September 13, 2003 10:25 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] TJ: A question about COND function
> 
> 
> Hi Tomasz!
> Say, is there anything wrong with the following line:
> COND1=Cross(Signal(),MACD())OR Ref(Cross(Signal(),MACD()),-1);
> Only the first part of the proposition is taken into account, is it
> forbidden to use OR into a COND function?
> I join the whole formula below:
> // INDICATOR BUILDER PART
> Plot(MACD(),"MACD",1,1);
> Plot(Signal(),"Signal",4,1);
> 
> 
> COND1=Cross(Signal(),MACD())OR Ref(Cross(Signal(),MACD()),-1);
> PlotShapes(shapeUpTriangle*COND1,colorYellow);// all COND1 before
> ExRem
> COND2=Cross(Signal(),0);
> PlotShapes(shapeSmallCircle*COND2,colorBlue);// all COND2 before 
Exrem
> COND1=ExRem(COND1,COND2);COND2=ExRem(COND2,COND1);
> G=COND1;
> PlotShapes(shapeDownArrow*G,colorRed);
> // AA PART
> Filter=G;
> AddColumn(C,"");
> Sell=Filter;
> I have tried everything that was within my (weak) habilities, 
Tomasz,
> you're my last hope *sigh*
> TIA!!
> Friendly,
> Gilles
> 
> 
>       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 ---------------------~-->
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/