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

RE: [amibroker] Real-Time Trading System Examples



PureBytes Links

Trading Reference Links

gty182,
Is it a joke ?
My logic is not enough to see "and" in
"events takes place one after other and happen same day"
My AFL logic says that your 
VAL1=BarsSince(EVENT1)>BarsSince(EVENT2) AND data_ev1==data_ev2;;
is always false and your 
CondS=VAL1 AND Ref(VAL1,-1)==0;
is always zero, no matter what DSu, Oo are.
Just curious what  "Works fine " for you.
Dimitris Tsokakis


--- In amibroker@xxxxxxxxxxxxxxx, "gty182" <gty182@xxxx> wrote:
> I solved my problem, here is the solution :
> 
> It checks if events takes place one after other and happen same 
day. Works fine for me, thanks again.
> 
> Maybe somone will find it usefull
> EVENT1=Cross(H,DSu); 
> 
> EVENT2=Cross(Oo,L); 
> 
> data_ev1=ValueWhen(EVENT1,DayOfYear(),1);
> 
> data_ev2=ValueWhen(EVENT2,DayOfYear(),1);
> 
> VAL1=BarsSince(EVENT1)>BarsSince(EVENT2) AND data_ev1==data_ev2;;
> 
> CondS=VAL1 AND Ref(VAL1,-1)==0; 
> 
> 
> 
> gty



------------------------ 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/