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

Re: [amibroker] Sector condition



PureBytes Links

Trading Reference Links




Jayson,
 
Thanks for the help. Your code works well. I 
included the inc from the following code. 
 
inc = 1;sym = "~" + SectorID(1);
 
AddToComposite( inc * L, 
sym,"L");AddToComposite( inc * O, sym,"o");AddToComposite( inc * H, 
sym,"h");AddToComposite( inc * C, sym,"c");AddToComposite( inc * V, sym, 
"V");
 
Regards,
 
Nick
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Jayson 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, December 11, 2003 3:00 
  PM
  Subject: RE: [amibroker] Sector 
  condition
  
  <FONT face=Arial color=#0000ff 
  size=2>Nick,
  <FONT face=Arial color=#0000ff 
  size=2>Sectorid() is not a ticker and therefore you can not call it as a 
  foreign symbol. You could on the other hand call the appropriate composite 
  ticker by using  
  <FONT face=Arial color=#0000ff 
  size=2> 
  sym = "~" + 
  SectorID(1);
  Buy= 
  Foreign(sym,"C")>MA(Foreign(sym,"C"),60);
  <FONT 
  face="Courier New"> 
  Just 
  curious but.... what is the significance of inc?
  <FONT 
  face="Courier New"> 
  <FONT face=Arial 
  color=#0000ff size=2> 
  
   
  Regards, 
  Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: nickrobn 
  [mailto:nickrobinson@xxxxxxxxxxxxxxx]Sent: Wednesday, December 10, 
  2003 5:51 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
  [amibroker] Sector conditionI have unsuccessfully 
  programmed the following (bad arguments, Error2):Buy= 
  Foreign(SectorID(),C,1)>MA(Foreign(SectorID(),C,1),60);ie I want to 
  buy when the close of the composite sector for the stock is greater than 
  the 60 day moving average of the composite.Any help would be 
  appreciated. Note that I have introduced composites later as:inc = 
  1;sym = "~" + SectorID(1);AddToComposite( inc * L, 
  sym,"L");AddToComposite( inc * O, sym,"o");AddToComposite( inc * H, 
  sym,"h");AddToComposite( inc * C, sym,"c");AddToComposite( inc * V, 
  sym, "V");regardsNickSend 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. 
  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.