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

RE: [amibroker] Code help, please



PureBytes Links

Trading Reference Links




Keith, 
what are you doing  when you say:
 
cd23=Sum(<FONT 
color=#0000ff>IIf(Change<0,<SPAN 
class=721535502-14062003>b=Change),<FONT 
color=#ff00ff>0),Len);

 
Why 
wouldn't you say:
<FONT 
face="Times New Roman">cd23=<FONT face="Times New Roman" 
color=#0000ff>Sum(<FONT 
face="Times New Roman" color=#0000ff>IIf<FONT 
face="Times New Roman">(Change<<FONT face="Times New Roman" 
color=#ff00ff>0,<FONT 
face="Times New Roman" color=#0000ff>abs<FONT 
face="Times New Roman">(Change),<FONT face="Times New Roman" 
color=#ff00ff>0),Len);
-----Original 
Message-----From: Keith Newhouse 
[mailto:knewhous@xxxxxxxxxxxxxxx]Sent: Friday, June 13, 2003 10:48 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Code 
help, please
<BLOCKQUOTE 
>Here 
  is the Metastock code for Ehlers Smoothed RSI and below is my attempt in 
  AFL.  The AFL code is obviously incorrect as it produces an entirely 
  different result.  Could some one correct it for me, 
  please.KeithMetastock.len:=Input("No of 
  bars",1,100,14);smooth23:=(C+(2*Ref(C,-1))+(2*Ref(C,-2))+Ref(C,-3))/6;change:=ROC(smooth23,1,$);cu23:=Sum(If(change>0,change,0),len);cd23:=Sum(If(change<0,Abs(change),0),len);cu23/(cu23+cd23)AFLLen=10;smooth23=(C+(2*Ref(C,-1))+(2*Ref(C,-2))+Ref(C,-3))/6;Change=ROC(smooth23,1);cu23=Sum(IIf(Change>0,Change,0),Len);cd23=Sum(IIf(Change<0,b=Change,0),Len);SRSI=Cu23/(Cu23+Cd23);Plot(SRSI,"SRSI",colorRed,styleLine);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












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.