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

Re: [amibroker] Exploration Problem



PureBytes Links

Trading Reference Links




Hi Ron,
 
It looks like your code contains a few mistakes, 
but I am not sure what you are trying to do. Explorer is generally used to find 
stocks that meet a certain condition(s). You would be better off to use 
Backtester if you are trying to backtest, or Scan if you are just looking for 
buy/sell signals. If you can explain what conitions you are exploring for, I 
will try to help you with the code.
 
Steve
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  mrdavis9 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibrokeryahoogroups 
  Sent: Wednesday, September 17, 2003 5:00 
  PM
  Subject: [amibroker] Exploration 
  Problem
  
  
  This is my first attempt to run an exploration, and 
  I have questions and also 
  problems.                                     
  
  The idea is to buy when stochk(14) crosses up 
  through stochd(14).  The position will then be held till until the 
  Cross(stochkd(14),stochk(14)) occurs.   
  The first time that I run it, I want 
  to set this Exploration to run on only one historical day, 
  so I will set the  AA range from 9/2/03 to 9/2/03, and I will 
  leave the n= box set at 1.  Are these the correct range 
  settings to run it on only one day?
  Also, this is my first attempt to use ValueWhen, 
  and BarsSince.  Does it look correctly coded to do what I am wanting to 
  do?   Maybe my 
  AddColumns are also incorrect.
  Additionally,When I try to run 
  it, I get a syntax error at the right side end of the SellStocVal line of 
  code.  
  All help will be appreciated.   Ron 
  D
  BuyStocVal=ValueWhen<FONT 
  size=1>(Cross<FONT 
  size=1>(StochK<FONT 
  size=1>(14),<FONT 
  color=#0000ff size=1>StochD(<FONT color=#ff00ff 
  size=1>14)),<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),1<FONT 
  size=1>);
  SellStocVal=ValueWhen<FONT 
  size=1>(Cross<FONT 
  size=1>(StochD<FONT 
  size=1>(14),<FONT 
  color=#0000ff size=1>StochK(<FONT color=#ff00ff 
  size=1>14)),<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),<FONT color=#0000ff 
  size=1>BarsSince(<FONT color=#0000ff 
  size=1>Cross(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),<FONT color=#0000ff 
  size=1>StochD(<FONT color=#ff00ff 
  size=1>14)));
  StocRise=SellStocVal-BuystocVal; 
  Entryprice=ValueWhen<FONT 
  size=1>(Cross<FONT 
  size=1>(StochK<FONT 
  size=1>(14),<FONT 
  color=#0000ff size=1>StochD(<FONT color=#ff00ff 
  size=1>14)),<FONT color=#0000ff 
  size=1>Ref(Open,<FONT color=#ff00ff 
  size=1>0),1<FONT 
  size=1>);
  Exitprice=ValueWhen<FONT 
  size=1>(Cross<FONT 
  size=1>(StochD<FONT 
  size=1>(14),<FONT 
  color=#0000ff size=1>StochK(<FONT color=#ff00ff 
  size=1>14)),<FONT color=#0000ff 
  size=1>Ref(Open,<FONT color=#ff00ff 
  size=1>0),<FONT color=#0000ff 
  size=1>BarsSince(<FONT color=#0000ff 
  size=1>Cross(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),<FONT color=#0000ff 
  size=1>StochD(<FONT color=#ff00ff 
  size=1>14)));
  Pricerise=Exitprice-entryprice;
  percentrise=pricerise/entryprice;
  Filter=Buystocval AND Sellstocval AND stocrise 
  AND entryprice AND exitprice AND 
  pricerise;
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Buy 
  Value"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Sell 
  Value"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Stoc 
  Rise"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Buy 
  price"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Sell 
  price"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"Price 
  rise"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT 
  color=#0000ff size=1>
  AddColumn(<FONT color=#0000ff 
  size=1>StochK(<FONT color=#ff00ff 
  size=1>14),"% 
  change"format=<FONT color=#ff00ff 
  size=1>1.2<FONT 
  size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);
   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.