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

[amibroker] how to return/end from the middle of the code execution for one stock.



PureBytes Links

Trading Reference Links




<FONT face=Arial 
color=#0000ff size=2>as if you're the only one that's ever done anything like 
that!
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>d

  
  
  From: ericleake 
  [mailto:eleake@xxxxxxxxxxxxxxxxxx] Sent: Friday, March 05, 2004 
  9:46 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  Re: Converting AIQ to Amibroker
  No, it's that I'm too embarassed to point it out! I had a "g" 
  where I needed a "v". It's been a good, but long week!-e. 
  --- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> 
  wrote:> and you're NOT going to share it?>  > Tisk, 
  tisk!>  > d> > >   
  _____  > > From: ericleake [mailto:eleake@xxxx] > 
  Sent: Friday, March 05, 2004 4:51 PM> To: 
  amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] Re: Converting AIQ to 
  Amibroker> > > Nevermind....figured it out.> 
  > -e.> > --- In amibroker@xxxxxxxxxxxxxxx, "ericleake" 
  <eleake@xxxx> wrote:> > Anyone familiar with AIQ's EDS 
  language? After trying to convert > > some simple code from AIQ to 
  Amibroker, I am getting different > > signals from each. I'm sure 
  there is something simple I am > missing, > > but I can't see 
  it. > > > > Can anyone see a difference in these 
  two?> > > > ***********************AIQ > 
  CODE:*************************************> > > > !Russell 
  2000 Growth vs. Value study> > !Last Edit 3/4/04> > 
  > > > > RV is TickerUDF("$R2K-V", [close]).> > 
  RG is TickerUDF("$r2K-G", [close]).> > > > TwentyDROC is 
  ([close]-val([close],20))/val([close],20)*100.> > > > RSG5 
  is (RG-Valresult(RG,5))/(Valresult(RG,5))*100.> > RSG15 is 
  (RG-Valresult(RG,15))/(Valresult(RG,15))*100.> > RSG25 is 
  (RG-Valresult(RG,25))/(Valresult(RG,25))*100.> > RSG35 is 
  (RG-Valresult(RG,35))/(Valresult(RG,35))*100.> > > > RSG 
  is (RSG5 + RSG15 + RSG25 + RSG35)/4.> > > > RSV5 is 
  (RV-Valresult(RV,5))/(Valresult(RV,5))*100.> > RSV15 is 
  (RV-Valresult(RV,15))/(Valresult(RV,15))*100.> > RSV25 is 
  (RV-Valresult(RV,25))/(Valresult(RV,25))*100.> > RSV35 is 
  (RV-Valresult(RV,35))/(Valresult(RV,35))*100.> > > > RSV 
  is (RSV5 + RSV15 + RSV25 + RSV35)/4.> > > > > > 
  Buy if RSG > RSV.> > Sell if RSG < RSV.> > > 
  > BuySig is RSG-RSV.> > > > List if 1.> > 
  > > > > > > 
  ******************AFL:*******************************************> > 
  //First Attempt at Russell Growth/Value strategy> > > > 
  Growth = Foreign("$r2k-g","Close", fixup = 1);> > Value = 
  Foreign("$r2k-v","Close", fixup = 1);> > > > G1 = 
  ROC(Growth, 5); > > G2 = ROC(Growth, 15);> > G3 = 
  ROC(Growth, 25);> > G4 = ROC(Growth, 35);> > > > 
  GI = (G1 + G2 + G3 + G4)/4;> > > > V1 = ROC(Value, 5); 
  > > v2 = ROC(Value, 15);> > v3 = ROC(Value, 25);> 
  > v4 = ROC(Value, 35);> > > > VI = (v1 + v2 + v3 + 
  G4)/4;> > > > Buy=GI > VI;> > Sell=VI > 
  GI;> > Short=VI > GI;> > Cover=GI > VI;> > 
  > > Filter=Buy OR Sell; //OR Short OR Cover;> > 
  //Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);Short=ExRem> > 
  (Short,Cover); Cover=ExRem(Cover,Short);> > > > > 
  > > > //Filter = GroupID() == 1;> > //PositionSize = 
  -100;> > //SetOption("MaxOpenPositions", 1 ); > > 
  //SetTradeDelays(1,1,1,1);> > > > > > > 
  > //Explore Code:> > > > AddColumn( GI, "GI", 1.2 
  ,colorDefault, IIf( GI > VI, colorGreen, > > colorDefault ) 
  );> > AddColumn( VI, "VI", 1.2 ,colorDefault, IIf( VI > GI, 
  colorRed, > > colorDefault ) );> > AddColumn( GI, "GI", 
  1.2);> > AddColumn( VI, "VI", 1.2);> > AddColumn( Growth, 
  "Russell Growth", 1.2 );> > AddColumn( Value, "Russell Value", 1.2 
  );\> > > > > > Thanks for any 
  assistance.> > > > -Eric.> > > 
  > 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 Links> > > *      
  To visit your group on the web, go to:> <A 
  href="">http://groups.yahoo.com/group/amibroker/>   
  > > *      To unsubscribe from this 
  group, send an email to:> amibroker-unsubscribe@xxxxxxxxxxxxxxx> 
  <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
  >   > > *      Your 
  use of Yahoo! Groups is subject to the Yahoo! Terms of Service> 
  <<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 
  


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 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.