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

Re: [amibroker] OT: file finder/indexer/sorter



PureBytes Links

Trading Reference Links




A for loop seems to do the trick:
 
V1[0]=<FONT 
color=#ff00ff>0;

for ( i = 
1 ; i < BarCount ; i++ ) 
{
     
if( C[i] > V1[i-<FONT 
color=#ff00ff>1] ) {
        V1[i] = 
C[i] * 1.1;
    } <FONT 
color=#800000>else {
        V1[i] = 
V1[i-1];
    }
}
Plot(V1,<FONT 
color=#ff00ff>"V1",colorRed,styleLine);<FONT 
color=#0000ff>
Plot<FONT face=Arial 
size=2>(C,<FONT 
color=#ff00ff>"C",colorBlack,styleLine);
Regards,
Bob
----- Original Message ----- 
<BLOCKQUOTE 
>
  <DIV 
  >From: 
  <A title=don.edwards@xxxxxxxxxxxxxx 
  href="">doedau 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, May 09, 2004 4:44 AM
  Subject: [amibroker] Re: I cant get this 
  to work
  Hi Graham, not much else to do on a wet Perth 
  afternoon!?Unfortunately I dont think this works because 'buy' is in 
  effect the previous value of 'variable' and Ami will not let you call a 
  value until its defined.I tried:value=1.1*C;value=iif( 
  C>ref(value,-1) , 1.1*C , ref(value,-1) );I thought this would 
  carry updated 'value' forward but as usual I was 
  wrong!Redards--- In amibroker@xxxxxxxxxxxxxxx, 
  "Graham" <gkavanagh@xxxx> wrote:> This may work> Value = 
  highestsince(Buy,1.1*C);> > Cheers,> Graham> <A 
  href="">http://e-wire.net.au/~eb_kavan/> 
  > -----Original Message-----> From: doedau 
  [mailto:don.edwards@xxxx] > Sent: Sunday, May 09, 2004 5:10 PM> 
  To: amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] I cant get this to 
  work> > Hi,> Could you help please, I ought to be able to 
  code this but cant make > it work.> > 1. set an 
  initial value = 1.1*Close> 2. hold that value constant until 
  Close>value> 3. then reset value (or some other variable) to new 
  higher 1.1*C> 4. hold that new value constant until again Close> new 
  value> 5. keep repeating steps 3 and 4 > > Its something 
  like a trailing stop but above the close (I dont want > to use 
  applystop() even if it would do the job, as this is only part > of 
  the code I am developing).> > Many thanks in advance, Regards 
  Don.> > > > > 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 
  > Yahoo! Groups LinksSend 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.