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

RE: [amibroker] EOD Trade Arrows on RT charts



PureBytes Links

Trading Reference Links




Instantaneous Trendline? (Attachment)
Seems that TJ did this one first, can't 
remember...
 
-CS
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Ara Kaloustian 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">Ami-Main 
  Sent: Monday, February 23, 2004 12:04 
  PM
  Subject: [amibroker] AFL - Translatin TS 
  code
  
  The code below gives me an error of:
  Error 3.Condition in IF, WHILE, FOR 
  statementshas to be Numeric or Boolean type
   
  Problem area highlighted below.
   
  Anyone see the problem?
   
  Thanks
   
  Ara
   
  PS: Does anyone have this code already (John 
  Ehler's Trendline). Trying to convert from Trade Station
   
   
  
  //File: DEV - Ehler Trendline
  Price =(H+L)/2<FONT 
  size=1>;
  Imult =0.635;
  Qmult =0.338;
  InPhase =0;
  Quadrature =0;
  Phase =0;
  DeltaPhase =0;
  count =0;
  InstPeriod =0;
  Period =0;
  Trendline =0;
   
  if (<FONT color=#0000ff 
  size=1>LastValue(<FONT color=#0000ff 
  size=1>BarIndex()) > <FONT color=#ff00ff 
  size=1>5)
  //Detrend Price
  {Value3 = Price - Ref<FONT 
  size=1>(Price,-7);}
   
  //Compute InPhase AND Quadrature components
  Inphase = 1.25<FONT 
  size=1>*(Ref<FONT 
  size=1>(Value3,-4) - 
  Imult*Ref<FONT 
  size=1>(Value3,-2)) + 
  Imult*Ref<FONT 
  size=1>(InPhase,-3);
  Quadrature = Ref<FONT 
  size=1>(Value3,-2) - 
  Qmult*Value3 + Qmult*Ref<FONT 
  size=1>(Quadrature,-2<FONT 
  size=1>);
  //Use ArcTangent to compute the current phase
  LastInPhase = LastValue<FONT 
  size=1>(InPhase);
  if (<FONT color=#0000ff 
  size=1>abs(LastInPhase + <FONT color=#0000ff 
  size=1>Ref(LastInPhase,-<FONT color=#ff00ff 
  size=1>1<FONT 
  size=1>)))                 <FONT 
  size=2> // <==== Problem in Ref(LastInPhase,-1)<FONT 
  color=#008000>
  {<FONT 
  color=#008000 size=1>
  //Phase = atan(abs((Quadrature+Ref(Quadrature,-1)) / 
  (InPhase+Ref(InPhase,-1))));
  a=0;
  }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 Sponsor


ADVERTISEMENT




Click Here















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.







Attachment:
Ehlers Instantaneous Trendline.afl

Attachment: Description: "Description: Binary data"