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

RE: [amibroker] Re: Plotting an interval´s condition



PureBytes Links

Trading Reference Links




<SPAN 
class=754224416-08042003>Markus,
I am 
sure there are many ways to do this. Here is one solution. You can use it in 
indicator builder to see the the bar (title shows price and cum(1)) or explore 
in AA using "All quotations. Param allows you to adjust the start and end 
points.....
<FONT 
color=#282828> <FONT 
color=#0000ff>
<FONT 
color=#282828 size=2> 
x=Cum(<FONT 
size=2>1)<=730 
AND <FONT 
size=2>H==LastValue<FONT 
color=#282828 size=2>(cond1);<FONT 
color=#0000ff>
test=ValueWhen(<FONT 
size=2>LastValue(x),Cum<FONT 
size=2>(1),<FONT 
size=2>1<FONT 
color=#0000ff>);
 
Plot(<FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1)==start,<FONT color=#ff00ff 
size=2>"Start",<FONT color=#ff00ff 
size=2>5,<FONT color=#ff00ff 
size=2>2);<FONT color=#0000ff 
size=2>
Plot(<FONT color=#000000 
size=2>H==<FONT color=#0000ff 
size=2>LastValue(Cond1),<FONT 
color=#ff00ff size=2>"",<FONT 
color=#ff00ff size=2>4,<FONT 
color=#ff00ff size=2>2);<FONT 
color=#0000ff size=2>
Plot(<FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1)==end,<FONT color=#ff00ff 
size=2>"End",<FONT color=#ff00ff 
size=2>5,<FONT color=#ff00ff 
size=2>2);
 
Title="High Value "<FONT 
size=2>+WriteVal(<FONT 
size=2>LastValue(Cond1)) +" at bar 
" +WriteVal<FONT 
size=2>(ValueWhen(<FONT 
size=2>H==LastValue<FONT 
size=2>(Cond1),Cum(<FONT 
size=2>1<FONT 
color=#0000ff>)));
 
Filter=<FONT 
size=2>ValueWhen(<FONT 
size=2>H==<FONT 
size=2>LastValue(Cond1),Cum<FONT 
size=2>(1<FONT 
color=#0000ff>));
AddColumn(<FONT color=#0000ff 
size=2>LastValue(Cond1),<FONT 
color=#ff00ff size=2>"High Value"<FONT color=#282828 
size=2>);
AddColumn(<FONT color=#0000ff 
size=2>ValueWhen(<FONT color=#000000 
size=2>H==<FONT color=#0000ff 
size=2>LastValue(Cond1),<FONT 
color=#0000ff size=2>Cum(<FONT 
color=#ff00ff size=2>1)),<FONT 
color=#ff00ff size=2>"Bar #");<FONT 
color=#0000ff size=2>
AddColumn(<FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1),<FONT color=#ff00ff 
size=2>"total");
 
 Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: funnybiz@xxxxxx 
[mailto:funnybiz@xxxxxx]Sent: Tuesday, April 08, 2003 12:33 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Re: Plotting an intervalīs condition
Jsayson,
 
I found my mistake: I had to add for whatever 
reason lastvalue(...).
 
But I still canīt find the respective cum valuer by 
using
 
Valuewhen(condition,cum(1),1)
 
Why is that?
 
Markus
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  IVA GmbH 
  To: <A 
  href="" 
  title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, April 08, 2003 6:17 
  PM
  Subject: Re: [amibroker] Re: Plotting an 
  intervalīs condition
  
  Jayson,
   
  interestingly, I donīt seem to be able to get the 
  HHV value itself, let alone the respective cum value!!!??? It may be my 
  ignorance or something else>VBG<.
   
  Please have a look with me at the attached 
  chart.
   
  I have circled the high Iīm after. In the 
  indicator windows below, called linechangeup and linechangedown, you see green 
  and red bars, one of each being circled yellow as well.
   
  Now, the high value (and itīs resoective cum 
  value Iīm also after in a separate step) are right between a green bar of 
  linechangeup and a red bar of linechangedown as you can see.
   
  Letīs say the circled red bar has the cum value 
  of "test" and the circled green bar has the cum value of "test4".
   
  Then, the highest high in between should 
  be
   
  hhv(high,(test1-test4)+1) which is shifted from 
  the last bar to the left by the factor of lastvalue(cum(1)-test1, 
  thus:
   
  <FONT face=Arial 
  size=2>Ref(hhv(high,(test1-test4)+1),-(lastvalue(cum(1)-test1))
   
  But this gives me another result for whatever 
  reason!!!!!
   
  Whereīs my flaw???????
   
  Appreciate it a lot!
   
  Markus
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A href="" 
    title=jcasavant@xxxxxxxxxxxx>Jayson 
    To: <A 
    href="" 
    title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
    Sent: Tuesday, April 08, 2003 4:21 
    PM
    Subject: RE: [amibroker] Re: Plotting 
    an intervalīs condition
    
    <SPAN 
    class=789361814-08042003>Markus,
    <SPAN 
    class=789361814-08042003> 
    <SPAN 
    class=789361814-08042003>Once you know your HHV just use 
    valuewhen.
    <SPAN 
    class=789361814-08042003> 
    <SPAN 
    class=789361814-08042003>x=your criteria to find cond1
    <SPAN 
    class=789361814-08042003> 
    <SPAN 
    class=789361814-08042003>valuewhen(x,cum(1));
     Jayson 
    <FONT face=Tahoma 
    size=2>-----Original Message-----From: <A 
    href="">funnybiz@xxxxxx 
    [mailto:funnybiz@xxxxxx]Sent: Tuesday, April 08, 2003 10:10 
    AMTo: <A 
    href="">amibroker@xxxxxxxxxxxxxxxSubject: 
    Re: [amibroker] Re: Plotting an intervalīs 
    conditionDimitris,I thought of something 
    different and thus try ti reqord what Iīm after.Please look at the 
    accompanying chart:Iīm after the highest high between the two red 
    bars (bar number 542 and606).Once Iīve foudn the value for the 
    highest high (here: bar # 575 and a valueof 2.92), Iīd like to get the 
    barīs cum() value.By using a plot, Iīd like to get a simple 
    histogram bar in a separate chartwindow.Do you know what I 
    mean?Thanks for your assistance!Markus----- Original 
    Message -----From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>To: 
    <amibroker@xxxxxxxxxxxxxxx>Sent: Tuesday, April 08, 2003 1:07 
    PMSubject: [amibroker] Re: Plotting an intervalīs 
    condition--- In amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" 
    <funnybiz@xxxx> wrote:> Dimitris,>> datīs 
    neat!>> 1./ May I ask how come that the second solution works 
    though thereis no IIF> command?? I looked up the plot function 
    but still canīt figure outwhich> paert of the function it refers 
    to.>> 2./ Now, that youīve defined a certain range to be 
    plotted for me:how would> I then instruct AB to plot (in a 
    separate window) a historic barfor the> highest high in that 
    range??? I thought about highestsincebarsfunction but> somehow I 
    canīt get it worked out.k=Cum(1)>=607 AND 
    Cum(1)<730;Plot(H,"H",k,1);Plot(LastValue(Highest(k*H)),"period 
    HIGHEST",4,8);>> Markus> ----- Original Message 
    -----> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>> To: 
    <amibroker@xxxxxxxxxxxxxxx>> Sent: Tuesday, April 08, 2003 8:52 
    AM> Subject: [amibroker] Re: Plotting an intervalīs 
    condition>>> > There are two alternatives> 
    > a. Plot(IIf(Cum(1)>=607 AND Cum(1)<730,H,-1e10),"H",1,8);> 
    > plots ONLY the requested bars and> > b. 
    Plot(H,"H",Cum(1)>=607 AND Cum(1)<730,8);> > It is better, 
    perhaps, because you see the scaling of the noncolored> > 
    bars.> > DT> >> > --- In 
    amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" 
    <funnybiz@xxxx>wrote:> > > Hello,> > 
    >> > > I thought that> > >> > > 
    Plot(ValueWhen(Cum(1)>=607 AND Cum(1)<730,High,1),"cum value 
    1.> > swing top",7,2)> > >> > > would 
    plot the high for the interval >=607 and <730, but> > 
    apparently, it plots even beyond that (i.e. bar number > 730).Why 
    is> > that?> > >> > > How would I have 
    to formulate the AFL command if it were to plot> > JUST WITHIN 
    this range, please?> > >> > > Markus> 
    >> >> >> > Send BUG REPORTS to 
    bugs@xxxx> > Send SUGGESTIONS to suggest@xxxx> > 
    -----------------------------------------> > Post AmiQuote-related 
    messages ONLY to: amiquote@xxxxxxxxxxxxxxx> > (Web page: <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)> 
    > --------------------------------------------> > Check group 
    FAQ at:> <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html> 
    >> > Your use of Yahoo! Groups is subject to<A 
    href="">http://docs.yahoo.com/info/terms/> 
    >> >Send BUG REPORTS to 
    bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx(Web page: <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at:<A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYour 
    use of Yahoo! Groups is subject to <A 
    href="">http://docs.yahoo.com/info/terms/Send 
    BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
    Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS 
    to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
    Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 
  SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.