PureBytes Links
Trading Reference Links
|
Hello,
Buy1= C> HHV(ref(c,-1),10);
Buy2=C>ref(c,-1)*1.03;
Buy=Buy1 and Buy2;
sell=ref(exremspan(Buy,5),-5);
>
> still learning the ropes of AB. Here are 2 simple BUY conditions I
> would like to test on a portfolio:
> BUY, if
>
> 1. Close is the highest in 10 days and
> 2. Close is 3% higher than yesterday's Close
>
> Exit at the Close after 5 days.
>
> This is what I tried:
> ------------------------------------
> Close10 = HHV ( Close,10); //defining a variable here
>
> Cond1 = C > (1.03 * Ref(Close,-1)); // this is the first condition
> Cond2 = C > Close10; // this is the 2nd condition
>
> Buy = (Cond1 AND Cond2);
>
> -----------------------------------------
> For EXIT (or SELL) I have defined an EXIT after 5 days under
> SETTINGS, STOPS and put down 5 BARS.
> Obviously there is something wrong. I get an error message:
> "Define BUY / SELL".
>
> Thanks for helping a greenhorn.
>
> Werner
------------------------ 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/mOAaAA/3exGAA/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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|