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

RE: [amibroker] Example using functions in MathLib (for Jayson)



PureBytes Links

Trading Reference Links




Thanks 
Chuck,
<SPAN 
class=611563119-07052003> 
<SPAN 
class=611563119-07052003>Forgive me the rudimentary questions and please correct 
me if I am wrong. First you declare the function with  
<FONT 
face=Arial>
function crLinearCorrelation (crLength) 

then you 
make your calculations with in the {   } and you base the results of 
the function with your IIf statement and the result of the calculations you call 
with..<SPAN 
class=611563119-07052003>
return <FONT 
color=#0000ff>IIf(crLowEQT == <FONT 
color=#ff00ff>0, 0, 
crUpEQ / crLowEQT);
Is it always assumed 
that following the function name  (crLinearCorrelation ) that the next 
argument is a period 
(crlength)??
 
Regards,
 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Chuck Rademacher 
[mailto:chuck_rademacher@xxxxxxxxxx]Sent: Wednesday, May 07, 2003 
3:22 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
Example using functions in MathLib (for Jayson)
<FONT color=#0000ff face=Arial 
size=2>Jayson...
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>Perhaps you missed another posting on the subject.
<FONT color=#0000ff face=Arial 
size=2> 
Here 
is an example using R-Squared that you might have in a trading 
system:
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>#INCLUDE  
"........................./crMathLib.afl";
<FONT color=#0000ff face=Arial 
size=2>..
Buy = 
LinRegSlope > 0 and crRSquared(20) > 0.80;
Sell = 
LinRegSlope < 0 and crRSquared(20) > 0.80;
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2> 
or, 
you might just want to graph R-Squared:
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2>graph(0) = crRSquared(20);
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2> 
<FONT color=#0000ff face=Arial 
size=2> 
<BLOCKQUOTE 
>
  <FONT face="Times New Roman" 
  size=2>-----Original Message-----From: Jayson 
  [mailto:jcasavant@xxxxxxxxxxxx]Sent: Wednesday, May 07, 2003 9:01 
  AMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
  New math functions added to AFL library (AmiBroker.com)
  <SPAN 
  class=666545812-07052003>Chuck,
  <SPAN 
  class=666545812-07052003>Thanks for sharing this. Could perhaps post an 
  example afl  showing the use of one or both?
   
  Regards,
   
  Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Chuck Rademacher 
  [mailto:chuck_rademacher@xxxxxxxxxx]Sent: Tuesday, May 06, 2003 
  3:57 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  New math functions added to AFL library (AmiBroker.com)
  I've 
  just uploaded a (very) small library of math functions to the AFL library at 
  AmiBroker.com.  It is a "work in progress" library and this first 
  posting is purely to get things going.  More functions will be added 
  regularly.  Users may cut and paste functions into their own code.  
  The name of the file is crMathLib.afl and the current version only 
  includes:
   
  <FONT color=#0000ff face=Arial 
  size=2>crLinearCorrelation (bars)
   
  <FONT color=#0000ff face=Arial 
  size=2>crRSquare (bars)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. 
  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. 
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.