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

Re: [amibroker] AFL - LLV / HHV



PureBytes Links

Trading Reference Links




Graham.
 
have 4 months of 1 min data ... need only 7 
bars...  (7 days at the 390 min interval) .... don't know any other 
way of 
computing bars needed .... unless there is 
another requirement ...
 
So I beleive I do have enough data
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=gkavanagh@xxxxxxxxxxxxx 
  href="">Graham 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Monday, December 01, 2003 3:32 
  PM
  Subject: RE: [amibroker] AFL - LLV / 
  HHV
  
  Ara, do you have enough 
  bars for the HHV at the higher intervals
   
   
  Cheers,Graham<A 
  href="">http://groups.msn.com/ASXShareTrading<A 
  href="">http://groups.msn.com/FMSAustralia 
  
  
    
    <FONT 
    face=Tahoma size=2>-----Original Message-----From: Ara Kaloustian 
    [mailto:ara1@xxxxxxxxxx] Sent: Tuesday, 2 December 2003 5:54 
    AMTo: Ami-MainSubject: [amibroker] AFL - LLV / 
    HHV
    
    Period1 = 7<FONT 
    size=1>;
    // Determine Time base
    //File: Mod - DateTime<FONT face=Arial 
    size=2>//Compute Data Interval
    EOD      = 
    IIf(Interval() > 5000 AND Interval() < 
    100000,1,0);Weekly   = IIf(Interval() > 100000 AND 
    Interval() < 1000000,1,0);Monthly  = IIf(Interval() > 
    2000000,1,0);RT5s     = IIf(Interval() == 
    5,1,0);RT1      = IIf(Interval() == 
    60,1,0);RT2      = IIf(Interval() == 
    120,1,0);RT5      = IIf(Interval() == 
    300,1,0);RT15     = IIf(Interval() == 
    900,1,0);RT30     = IIf(Interval() == 
    1800,1,0);RT60     = IIf(Interval() == 
    3600,1,0);RT195    = IIf(Interval() == 
    11700,1,0);RT390    = IIf(Interval() == 
    23400,1,0);RT       = IIf(Interval() 
    <  23401,1,0);Time_Int = Interval() / 
    60;_N(Period   = 
    WriteIf(EOD,"Daily",WriteIf(Weekly,"Weekly",WriteIf(Monthly,"Monthly",""))));
    //Compute DateY1  = Year();M1  
    = Month();D1  = Day();_N(DateStamp = WriteVal(M1,1.0) + "/" + 
    WriteVal(D1,1.0) + "/" + WriteVal(Y1,1.0));
    //Compute TimeHr  = Hour();Mn  
    = Minute();
    _N(TimeStamp = WriteVal(Hr,1.0) + ":" + 
    WriteIf(Mn<10,"0","") + WriteVal(Mn,1.0) + 
    WriteIf(Hr<12,"am","pm"));_N(Time = 
    WriteIf(RT,TimeStamp,""));
    // end of time base code<FONT 
    size=1>
    _N(QP2_Sym1 = <FONT color=#ff00ff 
    size=1>"!COMP");
    _N(eSig_Sym1= <FONT color=#ff00ff 
    size=1>"$COMPQ");
    
    _N<FONT 
    size=1>(Issue1 = WriteIf<FONT 
    size=1>(EOD OR Weekly OR Monthly,QP2_Sym1,eSig_Sym1)); 
    // Select different symbols based on EOD or RT 
    
    // Reference Formula: Stoc = ((Close - 
    LLV(Low,period)) / (HHV(High,Period)-LLV(Low,Period))) * 
    100;
    Issue1_C = Foreign<FONT 
    size=1>(Issue1,"Close"<FONT 
    size=1>);
    Issue1_H = Foreign<FONT 
    size=1>(Issue1,"High"<FONT 
    size=1>);
    Issue1_L = Foreign<FONT 
    size=1>(Issue1,"Low"<FONT 
    size=1>);
    Inx1_StocRaw = ((Issue1_C - <FONT color=#0000ff 
    size=1>LLV(Issue1_L,Period1)) / (<FONT 
    color=#0000ff size=1>HHV(Issue1_H,Period1)-<FONT 
    color=#0000ff size=1>LLV(Issue1_L,Period1))) * 
    100; <FONT 
    color=#008000 size=1>// Raw stochastic
     
    I am 
    using the above formula to compute the raw stochastic of NASDAQ and 
    DJ.
    This works fine for EOD and RT from 1 min to 60 
    min bars. When I switch to 195 min or 390 min bars, the LLV and HHV 
    calculations return {EMPTY} arrays.
     
    Anyone see the  problem?
    Thanks
    Ara
    <FONT face=Arial color=#000000 
    size=2> 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


  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.