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

Re: [amibroker] background color in chart



PureBytes Links

Trading Reference Links




Herman,
 
I don't think so. I want to know that I am 
seeing the last bar of the day to be able to enter the "if statement". Only 
if the price stays within certain limits the entire day then I want to 
enter the "if statement". Now I look one day ahead to find this bar:<FONT 
color=#000000>AND phase_arr[ i ] == 
1 <FONT 
color=#000000>AND phase_arr[ i + <FONT 
color=#ff00ff>1] != <FONT 
color=#ff00ff>1
So I need to know that I see the last 
"hour" or "minute" bar of that day before I want to enter the "if 
statement". Here the "if statement" I use currently that uses a future 
bar:
 
 <FONT 
color=#008000>        // stay in area 1 and 
cover position at the close<FONT 
size=2> 
         <FONT 
color=#800000>if (<FONT 
color=#000000>L[ i ] > B1[ i ] <FONT 
color=#000000>AND <FONT 
color=#000000>H[ i ] < HBOP[ i ] 
AND phase_arr[ i ] 
== 1 <FONT 
color=#000000>AND phase_arr[ i + <FONT 
color=#ff00ff>1] != <FONT 
color=#ff00ff>1<FONT 
color=#000000>) { 
                      
            <FONT 
color=#008000>// cover at close<FONT 
face="Courier New"> 
            <FONT 
color=#000000>Cover[ i ] = <FONT 
color=#ff00ff>1<FONT 
color=#000000>; 
            <FONT 
color=#000000>CoverPrice[ i ] = <FONT 
color=#000000>C<FONT 
size=2>[ i ]; 
            reaction_position_short 
= 0<FONT 
face="Courier New">; 
                
         } <FONT 
color=#800000>else<FONT 
size=2> 
<FONT face="Courier New" 
color=#800000> 
 So I like the code to 
look like without using a future bar:
 

 <FONT 
color=#008000>        // stay in area 1 and 
cover position at the close<FONT 
size=2> 
         <FONT 
color=#800000>if (<FONT 
color=#000000>L[ i ] > B1[ i ] <FONT 
color=#000000>AND <FONT 
color=#000000>H[ i ] < HBOP[ i ] 
AND 
ThisIsTheLastBarOfThisDay<FONT 
size=2>) { 
                      
            <FONT 
color=#008000>// cover at close<FONT 
face="Courier New"> 
            <FONT 
color=#000000>Cover[ i ] = <FONT 
color=#ff00ff>1<FONT 
color=#000000>; 
            <FONT 
color=#000000>CoverPrice[ i ] = <FONT 
color=#000000>C<FONT 
size=2>[ i ]; 
            reaction_position_short 
= 0<FONT 
face="Courier New">; 
                
         } <FONT 
color=#800000>else<FONT 
face="Courier New"> 
 
<FONT 
face="Courier New">regards,
 
Ed
<FONT face="Courier New" 
color=#800000> 

<BLOCKQUOTE dir=ltr 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Herman van den 
  Bergen 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, May 20, 2004 1:23 
PM
  Subject: RE: [amibroker] last bar in day, 
  close price
  
  <FONT 
  size=2>can't you use 
  DaysClosePrice = <FONT 
  face="Lucida Console" color=#0000ff>TimeFrameGetPrice<FONT 
  face="Lucida Console">(<FONT face="Lucida Console" 
  color=#ff00ff>"C"<FONT 
  face="Lucida Console">,inDaily);
  <FONT face=Arial 
  size=2>herman
  
    <FONT face=Tahoma 
    size=2>-----Original Message-----From: ed 
    [mailto:ed2000nl@xxxxxxx]Sent: Thursday, May 20, 2004 6:58 
    AMTo: <A 
    href="">amibroker@xxxxxxxxxxxxxxxSubject: 
    [amibroker] last bar in day, close price
    hello,
     
    I want to be able find the close price of 
    the last bar inside a day using intraday data.
     
    The problem is that if the price stays within a 
    certain range during the day the position is closed at the close price. 
    However I need to know what the last bar is of that day otherwise it would 
    close out the position at the first intraday bar.
     
    The condition therefor becomes: 
    1) Price is within the range.
    2) AND this is the last intraday bar of 
    this day.
     
    Currently I look one bar ahead to find that it 
    is the last bar of this day but this is not what I want,
     
    thanks for help,
     
    rgds, Ed  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 
    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 
    


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 Sponsor


  ADVERTISEMENT 












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