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

[amibroker] Re: corrected: log time plot



PureBytes Links

Trading Reference Links




In AA 
I ran your code with n =100 days (the explorations begins on 1/14/2004) My 
AA settings are set to 5 minute periodicity. I start getting readings on 
2/9/2004, so it takes that many bars to calculate the indicator. After running 
the exploration on CSCO. I clicked the buysig column to sort and found scores 
ranging from 1-7,183. I followed the procedure for each of the columns and found 
data on all but sellsig so there is likely a divide by zero error somewhere in 
the code. I think it was Graham that suggested you break the code down to 
smaller pieces to help you trouble shoot. You have a lot going on in the code 
and my approach would be to strip it down then add pieces to it one at a time 
until the problem jumps out....
 
Regards,Jayson 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: wooziwog 
  [mailto:xcitemint@xxxxxxx]Sent: Thursday, April 22, 2004 5:48 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  Bars Since Problem/Question - TimeFrame 
  QuestionHi,I have continued to attempt to 
  solve the problem I am dealing with and have followed suggetions from 
  Graham and Jayson to see if the indicators have values when I do an 
  exploration.  I have discovered that when I do the exploration that 
  the longer term indicators are not showing any values and that I have a 
  problem that I have not been able to resolve.  The problem is that 
  even though I set the timeframe to 15 minute in the exploration results 
  appear to from a daily time frame.  (When I double click on any of 
  the results from an exploration the chart appears set on the daily time 
  frame and the longer term indicators are missing)When I copy the 
  exploration formula into Indicator Builder and set the chart to a one 
  minute time frame the indicators appear on a 15 minute time frame as they 
  should.  Both the longer term and short term indicators appear in the 
  15 minute time frame.Is there any way to set the chart to 1 minute in 
  Indicator Builder or Explore?  I believe that would solve my problem 
  but I have not been successful in doing it.  Thank you for any help 
  you can provide.My system settings are as follows:1.Bars to 
  Load = 100,0002. Base Time Interval = 1 Minute3. Real Time 
  Date Provider = ESignalThe complete code is as 
  follows:_N(Timeinterval = 
  WriteIf(Interval()==86400,"Daily",      
              
              
              
  WriteIf(Interval()==432000,"Weekly",      
              
              
              
  WriteIf(Interval()==2160000,"Monthly",      
              
              
              
  WriteIf(Interval()==60, "1 Min", WriteVal(Interval()/60,1.0)+" 
  Mins")))));//+      
  WriteVal(DateTime(),formatDateTime)      _N( 
  Title  = Name()      
        + "  " + 
  Timeinterval      + "  " + Date()+ 
  "  Open:" + WriteVal(O,1.4)      + "  
  High:" + WriteVal(H,1.4)      + "  Low:" + 
  WriteVal(L,1.4)      + "  Close:" + 
  WriteVal(C,1.4)      + "  Volume:" + 
  WriteVal(V,1.0)      + WriteIf(C>=O, 
  EncodeColor(colorGreen), 
  EncodeColor(colorRed)));      //*Bar 
  Chart*//Plot(C,"Open="+WriteVal(O,1.4)+",High="+WriteVal(H,1.4)+",Low="+WriteVal(L,1.4)+",Close="+WriteVal(C,1.4),20,128,1.4);//Colored 
  OHLC Average*//HaClose=(O+H+L+C)/4; HaOpen = AMA( Ref( HaClose, -1 ), 
  0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( 
  HaClose, HaOpen ) ); PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "" , 
  colorBlack, styleCandle+styleNoLabel );///////////////// PRSI 
  ///////////////////function PRSI(price,eper,wper){Value = 
  EMA( RSI( wper ), eper );AUC = Wilders( Max( price - Ref( price, -1 ), 0 
  ), wper );ADC = Wilders( Max( Ref( price, -1 ) - price, 0 ), wper );x 
  = ( wper - 1 )*( ADC * Value/(100-Value)-AUC); PRSIP = IIf( x >= 0, 
  price + x, price + x*(100-Value)/Value );return 
  PRSIP;}////////////////////////////////////////* 
  Ti3 Average *//function 
  T3(price,periods,s){e1=EMA(price,periods);e2=EMA(e1,Periods);e3=EMA(e2,Periods);e4=EMA(e3,Periods);e5=EMA(e4,Periods);e6=EMA(e5,Periods);c1=-s*s*s;c2=3*s*s+3*s*s*s;c3=-6*s*s-3*s-3*s*s*s;c4=1+3*s+s*s*s+3*s*s;Ti3=c1*e6+c2*e5+c3*e4+c4*e3;return 
  ti3;}///////////////////////////////////////TimeFrameSet(in15Minute);PCLG=PRSI(C,100,150);Plot(PCLG,"",colorBrightGreen,styleThick);PCS2=PRSI(C,3,3);psp=Param("psp",5,2,500,1);PST=(t3(PCS2,psp,1.0));Plot(pst,"",colorBlue,styleThick);PCLR=PRSI(C,100,30);psr=Param("psr",10,2,500,1);PSRL=(t3(PCLR,psr,0.94));Plot(psrl,"",colorRed,styleThick);PCS=PRSI(C,43,50);PCSW=(pcs+pcs2)/2;psw=Param("psw",7,2,500,1);PSWL=(t3(pcsw,psw,0.94));Plot(pswl,"",colorWhite,styleThick);LR1=LinearReg(C,23);Plot(Lr1,"",colorYellow,styleThick+styleNoLabel);PCLR1=PRSI(C,200,230);psr1=Param("psr1",7,2,500,1);PSRL1=(t3(PCLR1,psr1,0.94));Plot(psrl1,"",colorBlack,styleThick);TimeFrameRestore();bls=BarsSince(Cross(psrl1, 
  H ));bgs=BarsSince( pclg > H );bus=BarsSince( pst > H 
  );res=BarsSince( psr1 > H );whs=BarsSince( pswl > H 
  );yes=BarsSince( Lr1 > H 
  );Sellsig=(bls+bgs+bus+res+whs+yes);blb=BarsSince( psrl1 < H 
  );bgb=BarsSince( pclg < H );bub=BarsSince( pst < H 
  );reb=BarsSince( psr1 < H );whb=BarsSince( pswl < H 
  );yeb=BarsSince( Lr1 < H 
  );Buysig=(blb+bgb+bub+reb+whb+yeb);Filter=1;Sell=(Buysig<30);PlotShapes(shapeDownArrow*Sell,colorRed);GraphXSpace=5;AddColumn(Buysig,"BuySig");AddColumn(Sellsig,"SellSig");AddColumn(H,"  
  High  ");AddColumn(pst,"  P S T  
  ");AddColumn(Lr1,"  LinReg  ");AddColumn(pswl,"  P S W 
  L  ");AddColumn(psrl1,"  P R S L  ");AddColumn(PCLG," P 
  C L G");AddColumn(psrl1,"  P S R L  
  ");TimeFrameRestore();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 












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.