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

Re: [amibroker] SPX Buy and Sell Signal



PureBytes Links

Trading Reference Links




Steve, 
 
Thanks again.   I changed the range to 
"all quotations" instead of "from" and now it is working like you said it was 
working  and also how I wanted it to work .   I wondered why 
I was getting 31 "buys" when I started.   Apparently Amibroker goes 
back to all my data even if I want it to start with a certain date and end with 
a certain date.   Not sure if that is correct or not....
 
I did see the modulus operator but thought that was 
using a 96 instead of %.   Better get my glasses checked.  I was 
not sure what it did anyway.   Thanks for the 
explanation.
 
Stan
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Steve Dugas 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, October 01, 2003 2:02 
  PM
  Subject: Re: [amibroker] SPX Buy and Sell 
  Signal
  
  Hi Stan,
   
  % is the modulus operator.  A = B % C 
  says that A = the remainder when B is divided by C
  
  I think you can find it in the AFL Reference 
  Manual in the help files.
  "anything % 2 == 0"  can 
  be used to separate the evens from the odds, as I did 
  below.
  In the code below, each even numbered occurance 
  of BUY (remainder == 0) is assigned to the sell array. Then the buy array is 
  redefined to hold only the odd numbered buys.
  I think you will find that it buys on the 1st buy 
  signal (and all other odd numbered buys) and sells on the even numberd buys 
  (in the original buy array). Please see the attached picture. Try setting AA 
  to all quotes and "filter = 1;"
   
  Steve
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    sjsolak 
    
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Wednesday, October 01, 2003 12:59 
    PM
    Subject: Re: [amibroker] SPX Buy and 
    Sell Signal
    
    Steve,
    Thank you.  This is very close to what I 
    want.   The small problem is that it starts to buy on the 2nd 
    event and then sell on 3rd, etc.   I would prefer buy on 1st and 
    sell on 2nd.  Other then that small problem, this is 
    great.....
     
    I am trying to learn and understand 
    Amibroker.  I tried to look up what the % 2 is doing.  Could not 
    find anything on this.  Probably looking in the wrong 
    place.   Doesn't seem to be in the help doc's.
     
    Thanks again.
    Stan
    <BLOCKQUOTE 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      Steve 
      Dugas 
      To: <A 
      title=amibroker@xxxxxxxxxxxxxxx 
      href="">amibroker@xxxxxxxxxxxxxxx 
      
      Sent: Wednesday, October 01, 2003 
      11:42 AM
      Subject: Re: [amibroker] SPX Buy and 
      Sell Signal
      . 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


  ADVERTISEMENT<img
src="" width=300 height=250 border=0>  









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.