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

[amibroker] Re: Code help - simple stuff for DT



PureBytes Links

Trading Reference Links

BTW, your title needs a comma.
It would be better
Re: Code help - simple stuff, for DT
because, as is, it is not "simple stuff for DT", I am a bit confused 
as you see...
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Sorry, my code was for another scenario.
> Now, your question has a before/after problem.
> If the "high day" cond1 is true  on 12/5, then the ValueWhen
(cond1,L) 
> will give us the Low of this "high day" *AFTER* this high day. 
Before 
> this, some previous ValueWhen(cond1,L) is valid. So, we can not use 
> ValueWhen(cond1,L) and compare it with other values *BEFORE* cond1. 
> In other words, the cond2 in
> 
> x=Cum(1); 
> cond1=Ref(H,-2)==HHV(H,5);
> Cond2=x<ValueWhen(Cond1,x);
> 
> is never true.
> Except if we want only the last cond1 occurrence, ie
> 
> x=Cum(1); 
> cond1=Ref(H,-2)==HHV(H,5);
> Cond2=x<LastValue(ValueWhen(Cond1,x));
> 
> then cond2 is true before the last cond1 occurrence.
> I am not sure I understand the question.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> > Thanks for the code....I think I made a mistake 
> > ref(h,-2) is the high day say on 12/5
> > I want the value of low prior to 12/5 which is lower than the low 
> on 
> > the high day
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> <TSOKAKIS@xxxx> 
> > wrote:
> > >  cond1=Ref(H,-2)==HHV(H,5);
> > > cond2=Ref(L,-1)<ValueWhen(cond1,L);
> > > cond3=Ref(L,-1)<ValueWhen(cond2,L);
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> 
> wrote:
> > > > 1. Identify a high that is higher than the previous and next 
> two 
> > > > trading days.
> > > > 2. Identify a previous bar low that is lower than the bar 
> > > identified 
> > > > in 1.
> > > > 3. Identify a previous bar low that is lower than the bar 
> > > identified 
> > > > in 2.
> > > > 
> > > > Any help will be appreciated


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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/