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

RE: [amibroker] Detecting selected day



PureBytes Links

Trading Reference Links









Don’t worry, I sorted this one out.

What I now need some help with is getting the previous low
that is lower than the current low.

In other words it is to look back from the selected bar on
the chart and draw a line at the previous lower low

I have put together a try on this and it does work, a bit
like a count back line. However it works too well and selects the next highest
low below my bars selected low in the history of the chart. It just looks for
the next lower low and draws the line there. I am wanting to look back from the
selected bar going backwards, not for the whole chart. 

Here is what I have cobbled together . I have included 4
lines of different colours to get a feel for what is happening.

Any help appreciated.

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
size=2 color=red face="Courier New">C<font size=2 color=black
face="Courier New">, <span
lang=EN-AU >"Close"<font
size=2 color=black face="Courier New">, <font size=2 color=red
face="Courier New">colorBlack<span
lang=EN-AU >, <font
size=2 color=red face="Courier New">styleCandle<font size=2
color=black face="Courier New">);

<font size=2 color=black
face="Courier New"> 

<font size=2 color=black
face="Courier New">CBL1 = (<span
lang=EN-AU >ValueWhen<font
size=2 color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU ><<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU >),<font
size=2 color=red face="Courier New">L<font size=2 color=black
face="Courier New">,<span
lang=EN-AU >1<font
size=2 color=black face="Courier New">));

<font size=2 color=black
face="Courier New">CBL2 = (<span
lang=EN-AU >ValueWhen<font
size=2 color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU ><<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU >),<font
size=2 color=red face="Courier New">L<font size=2 color=black
face="Courier New">,<span
lang=EN-AU >2<font
size=2 color=black face="Courier New">));

<font size=2 color=black
face="Courier New">CBL3 = (<span
lang=EN-AU >ValueWhen<font
size=2 color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU ><<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU >),<font
size=2 color=red face="Courier New">L<font size=2 color=black
face="Courier New">,<span
lang=EN-AU >3<font
size=2 color=black face="Courier New">));

<font size=2 color=black
face="Courier New">CBL4 = (<span
lang=EN-AU >ValueWhen<font
size=2 color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU ><<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">L<span
lang=EN-AU >),<font
size=2 color=red face="Courier New">L<font size=2 color=black
face="Courier New">,<span
lang=EN-AU >4<font
size=2 color=black face="Courier New">));

<font size=2 color=black
face="Courier New"> 

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">SelectedValue<font size=2
color=black face="Courier New">(CBL1), <font size=2
color=darkred face="Courier New">""<font
size=2 color=black face="Courier New">, <font size=2 color=red
face="Courier New">colorGreen<span
lang=EN-AU >, <font
size=2 color=red face="Courier New">styleLine<font size=2
color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">SelectedValue<font size=2
color=black face="Courier New">(CBL2), <font size=2
color=darkred face="Courier New">""<font
size=2 color=black face="Courier New">, <font size=2 color=red
face="Courier New">colorRed<span
lang=EN-AU >, <font
size=2 color=red face="Courier New">styleLine<font size=2
color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">SelectedValue<font size=2
color=black face="Courier New">(CBL3), <font size=2
color=darkred face="Courier New">""<font
size=2 color=black face="Courier New">, <font size=2 color=red
face="Courier New">colorBlue<span
lang=EN-AU >, <font
size=2 color=red face="Courier New">styleLine<font size=2
color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">SelectedValue<font size=2
color=black face="Courier New">(CBL4), <font size=2
color=darkred face="Courier New">""<font
size=2 color=black face="Courier New">, <font size=2 color=red
face="Courier New">colorBrown<span
lang=EN-AU >, <font
size=2 color=red face="Courier New">styleLine<font size=2
color=black face="Courier New">);

 



<font size=3 color=teal
face="Times New Roman">Cheers,
Graham

<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/ASXShareTrading

<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/FMSAustralia



<span
>-----Original Message-----
From: <font size=2
 face=Tahoma>Graham<font
size=2 face=Tahoma>
[mailto:gkavanagh@xxxxxxxxxxxxx] 
Sent: Friday, 23 May 2003 11:50 AM
To: <font size=2
 face=Tahoma>AB yahoo group<font
size=2 face=Tahoma>
Subject: [amibroker] Detecting
selected day

<font size=3
face="Times New Roman"> 

<span
lang=EN-AU >I can&#8217;t recall if
this has been asked before, or even if possible.

<span
lang=EN-AU >Is it possible to detect
the day that you double click on to create the vertical line on the chart
within an indicator. I want to use this in a chart indicator.

<span
lang=EN-AU > 

<font
size=3 color=teal face="Times New Roman">Cheers,
Graham

<font
size=2 color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/ASXShareTrading

<font
size=2 color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/FMSAustralia

<font size=3
face="Times New Roman"> 

<font size=2
face="Times New Roman">



<font size=2
face="Courier New">Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<span
>
Send 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<font
size=2> 

Your
use of Yahoo! Groups is subject to the <a
href="">Yahoo! Terms of Service.<font
size=2> 










Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.