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

[amibroker] [AFL help] How to sell at the second signal?


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] [AFL help] How to sell at the second signal?
  • From: kris45mar <kris45mar@xxxxxxxxx>
  • Date: Sat, 11 Dec 2004 18:41:31 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

PureBytes Links

Trading Reference Links

Hi All...

What function can I use if I want to sell the *second
time* an event occurs?

// buy and sell criteria here //
Profitline = EMA (H, (13)) + 2 * ATR (10);

EntryLine = LLV (L, 20) + (2.5 * ATR (10));

Buy = Cross(C,Entryline);


Sell = Cross(C,Profitline);

This gives me a sell signal the *first time* the close
crosses the Profitline.
How do I code for a sell signal the *second time* (or
third time for that matter) the close crosses the
profitline?

I thought I might be able to use 
Sell = Ref(cross(c,Profitline),2); as a sort
lookforward function, but this does not work.

or do I use the Sum or Cum functions somehow?

TIA

ChrisB



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/