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

Re: [amibroker] Re: Getting Some Signals Into AB for plotting



PureBytes Links

Trading Reference Links




Ken,
 
You can use also shorter (and much quicker in 
execution):
 

Sshort = 
0;d = 
DateNum();
Sshort = Sshort OR d == 
900926;Sshort = Sshort OR d == 
901003;
Hope this helps.
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Ken Close 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, November 16, 2003 7:52 
  PM
  Subject: RE: [amibroker] Re: Getting Some 
  Signals Into AB for plotting
  
  Bruce:  
  clever.<FONT 
  face=Verdana size=2>  That did it.  Thanks.<SPAN 
  lang=en-us>
  <FONT face=Verdana 
  size=2>Ken
  -----Original 
  Message-----From: bruce1r [<A 
  href="">mailto:brucer@xxxxxxxxx]Sent: Sunday, 
  November 16, 2003 1:25 PMTo: <A 
  href="">amibroker@xxxxxxxxxxxxxxxSubject: 
  [amibroker] Re: Getting Some Signals Into AB for plotting<SPAN 
  lang=en-us>
  Ken - this one is 
  easy if I'm assuming correctly that you are 
  producing AFL 
  code.  As soon as I can figure out how to use an 
  attachment on Yahoo, 
  I'll post something that may be more interesting 
  and more 
  automated.
  If you want to fix 
  your code issue, use -
  Sshort = 
  0;
  Sshort = 
  IIf(DateNum()==900926, Sshort+1, Sshort);
  <FONT face=Verdana 
  size=2>....
  --- In 
  amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> 
  wrote:
  > I have an excel 
  file of some signals that I want to get into AB for
  > plotting and 
  comparisons to AB code generated signals.
  > 
  
  > I have data in 
  this format:
  > 
  
  > 
  9/26/1990     Short
  > 
  11/2/1990     Cover
  > 
  11/2/1990     Buy
  > 
  1/31/1991     Sell
  > 
  2/11/1991     Buy
  > 
  6/21/1991     Sell
  > 
  6/21/1991     Short
  > 
  7/16/1991     Cover
  > 
  7/16/1991     Buy
  > 
  11/25/1991    Sell
  > 
  11/25/1991    Short
  > 
  
  > Some fancy Excel 
  footwork on my part allowed me to introduce 
  <FONT face=Verdana 
  size=2>statements
  > like 
  this:
  > 
  
  > 
  Sshort=IIF(DateNum()==900926,1,0);
  > 
  Scover=IIF(DateNum()==901102,1,0);
  > 
  Sbuy=IIF(DateNum()==901102,1,0);
  > 
  Ssell=IIF(DateNum()==910131,1,0);
  > 
  Sbuy=IIF(DateNum()==910211,1,0);
  > 
  Ssell=IIF(DateNum()==910621,1,0);
  > 
  Sshort=IIF(DateNum()==910621,1,0);
  > 
  Scover=IIF(DateNum()==910716,1,0);
  > 
  Sbuy=IIF(DateNum()==910716,1,0);
  > 
  Ssell=IIF(DateNum()==911125,1,0);
  > 
  Sshort=IIF(DateNum()==911125,1,0);
  > 
  
  > I had to get 
  this far to realize that the last Sshort statement 
  <FONT face=Verdana 
  size=2>would
  > replace the 
  Sshort array from previous statements, in other words, 
  I 
am
  > able to plot 
  only the LAST signal for each array.
  > 
  
  > I do not think I 
  want to create a statement in Excel for something 
  <FONT face=Verdana 
size=2>like
  > 
  
  > 
  Sshort=IIF(DateNum()==900926 OR DateNum()==910621 OR ..... etc.  
  It
  > seems like I 
  would have to hand type in all dates.  Yuk!
  > 
  
  > Can someone 
  suggest how I would go about getting the data shown at 
  the
  > top into four 
  arrays that can have the points highlighted with
  > PlotShapes 
  statements?  I am stuck.
  > 
  
  > Thanks for any 
  help,
  > 
  
  > 
  Ken
  <FONT face=Verdana 
  size=2>------------------------ Yahoo! Groups Sponsor 
  ---------------------~-->
  Buy Ink Cartridges or 
  Refill Kits for your HP, Epson, Canon or Lexmark
  Printer at 
  MyInks.com. Free s/h on orders $50 or more to the US & 
  Canada.
  <A 
  href="">http://www.c1tracking.com/l.asp?cid=5511
  <A 
  href="">http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
  <FONT face=Verdana 
  size=2>---------------------------------------------------------------------~->
  Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxx
  Send SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx
  <FONT face=Verdana 
  size=2>-----------------------------------------
  Post AmiQuote-related 
  messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
  (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)
  <FONT face=Verdana 
  size=2>--------------------------------------------
  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.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







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.