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

Re: [amibroker] Chart Title Question



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>goldwing01,
<FONT face=Arial color=#0000ff 
size=2> 
Thanks 
for the reply...
Code 
is not all mine... Just plagiarizing from the best - that I know of... with some 
originality.
<FONT face=Arial color=#0000ff 
size=2> 
OBTW - 
To test it out what you sent, I don't have the JurikJMA plug-in for this code... 
is it available somewhere on a complementary basis?
I 
remember seeing it somewhere... 
<FONT face=Arial color=#0000ff 
size=2> 
Is it 
really any different than a DEMA(StochD(40),20) or TEMA(StochD(40),20) 
???
<FONT face=Arial color=#0000ff 
size=2> 
<FONT 
face=Arial color=#0000ff size=2> 
<FONT face=Arial color=#0000ff 
size=2>Thanks,
Mr. 
Valley
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2> 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: goldwing01 
  [mailto:GOLDWING01@xxxxxxx]Sent: Thursday, January 29, 2004 8:20 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  Successive Approximation in fallMr. Valley nice 
  coding, may I wish I could even start a code and finish it so first of all 
  `my hat off to you sir'. Now my thought is DIMITRIS code works very well I 
  have used it for about 6 or 7 months as a comparison to other trends it 
  works fine and I like it, now you have a similar code, I was just 
  wondering how you would test each one for best results or at lease close 
  to tradable like code.by the way thanks for sharing./*TREND 
  DETECTOR WITH VARIABLE PERIOD, by D. Tsokakis, Apr2003*/t=20;// the 
  initial fast periodx=JurikJMA(StochD(40),t);Plot(x,"",1,8);// fast 
  trend detectortA=50;// slow periodxA=<FONT 
  color=#0000ff>JurikJMA(StochD(40),tA);Plot(xA,"",7,8);// 
  slow trend detectorCond1=Ref(x,-1)==LLV(x,3);Plot(50*Cond1,"",5,2);// 
  the start of the fast 
  uptrendCond2=Ref(x,-1)==HHV(x,3);Plot(50*Cond2,"",4,2);// the end of 
  the fast uptrendk1=BarsSince(Cond1);// uptrend bar 
  counterk2=BarsSince(Cond2);// downtrend bar 
  counterPlot((k2>k1)*10,"",5,2);Plot((k2<k1)*10,"",4,2);t1=IIf(k2>k1,t+k1,t+k2);// 
  the variable periodx1=DEMA(StochD(40),t1);// the variable trend 
  detectorPlot(x1,"",(x1>Ref(x1,-1))*5+(x1<Ref(x1,-1))*4,8);GraphXSpace=1; 
  --- In amibroker@xxxxxxxxxxxxxxx, "Mr Valley" 
  <valleymj@xxxx> wrote:> DT,> > OBTW, Any 
  Pythagorean  thoughts on a 6 or 7 or more, decimal successive> 
  approximation of TAN(Close) == 0; for say an, RSI > 50 ;> Or 
  whatever other successful method you may choose (poetic license 
  granted)> :>)> > You now, therefore Top == 
  Top;> > Any genius-like  thoughts would be greatly 
  appreciated.> > I'm struggling with a moving target here, on the 
  UP side during the day ...> I like the buy side, but the sell side 
  moves (Looking at 78Min  on equities> and futures), but looks 
  nice on EOD as well, including ^N225 EOD (Yuki, your> 
  thoughts?)  and ^RUA, (Fred, your thoughts?)  and those QQQ'ers out 
  there;> > Oh well, close enough for, whatchamacallit 
  work.> > When combined with Steve's StochRSI, it seems to be 
  another confirmation...> of the StochRSI, but looked at from a 
  different angle... so to speak...> > It's Close, but Any 
  thoughts appreciated... (Pal, does it work on FOREX?  Or> is 
  is humbly, back to the artistic pad...)  :>)> > 
  MV> > 
  ////////////////////////////////////////////////////INDICATOR #1 
  BEGIN> ///////// Paste Each in SEPARATE IB Windows 
  /////////////////////> /* MV Test v1*/> > 
  /////////////////////////////// Pivots section> > /* Pivots 
  Automatically */> > /* 
  ***********************************/> > //Code to automatically 
  identify pivots> > /*********************************** 
  */> > // -- what will be our lookback range for the hh and 
  ll?> > nBars = Param("Number of bars", 12, 5, 40);> 
  > // -- Title.> > //Title = Name() + " (" + 
  StrLeft(FullName(), 15) + ") O: " + Open + ", H: "> + High + ", L: 
  " + Low + ", C: " + Close;> > // -- Plot basic candle 
  chart> > //PlotOHLC(Open, High, Low, Close, "BIdx = " + 
  BarIndex() + "\n" + "O = " +> O + "\n"+"H = "+ H + "\n"+"L = " + L 
  + "\n"+"C ",colorBlack, styleCandle);> > 
  //GraphXSpace=15;> > // -- Create 0-initialized arrays the size 
  of barcount> > aHPivs = H - H;> > aLPivs = L - 
  L;> > // -- More for future use, not necessary for basic 
  plotting> > aHPivHighs = H - H;> > aLPivLows = L - 
  L;> > aHPivIdxs = H - H;> > aLPivIdxs = L - 
  L;> > nHPivs = 0;> > nLPivs = 0;> > 
  lastHPIdx = 0;> > lastLPIdx = 0;> > lastHPH = 
  0;> > lastLPL = 0;> > curPivBarIdx = 0;> 
  > // -- looking back from the current bar, how many bars> 
  > // back were the hhv and llv values of the previous> > 
  // n bars, etc.?> > aHHVBars = HHVBars(H, nBars);> 
  > aLLVBars = LLVBars(L, nBars);> > aHHV = HHV(H, 
  nBars);> > aLLV = LLV(L, nBars);> > // -- Would 
  like to set this up so pivots are calculated back from> > // 
  last visible bar to make it easy to "go back" and see the pivots> 
  > // this code would find. However, the first instance of> 
  > // _Trace output will show a value of 0> > aVisBars = 
  Status("barvisible");> > nLastVisBar = 
  LastValue(Highest(IIf(aVisBars, BarIndex(), 0)));> > 
  _TRACE("Last visible bar: " + nLastVisBar);> > // -- Initialize 
  value of curTrend> > curBar = (BarCount-1);> > 
  curTrend = "";> > if (aLLVBars[curBar] <> > 
  aHHVBars[curBar]) {> > curTrend = "D";> > 
  }> > else {> > curTrend = "U";> > 
  }> > // -- Loop through bars. Search for> > // 
  entirely array-based approach> > // in future version> 
  > //for (i=0; i<100; i++) {> > for (i=0; i<255 AND 
  BarCount > 255; i++) {> > > > curBar = 
  (BarCount - 1) - i;> > // -- Have we identified a pivot? If 
  trend is down...> > if (aLLVBars[curBar] < aHHVBars[curBar]) 
  {> > // ... and had been up, this is a trend change> 
  > if (curTrend == "U") {> > curTrend = "D";> 
  > // -- Capture pivot information> > curPivBarIdx = 
  curBar - aLLVBars[curBar];> > aLPivs[curPivBarIdx] = 1;> 
  > aLPivLows[nLPivs] = L[curPivBarIdx];> > 
  aLPivIdxs[nLPivs] = curPivBarIdx;> > nLPivs++;> > 
  }> > // -- or current trend is up> > } else 
  {> > if (curTrend == "D") {> > curTrend = 
  "U";> > curPivBarIdx = curBar - aHHVBars[curBar];> 
  > aHPivs[curPivBarIdx] = 1;> > aHPivHighs[nHPivs] = 
  H[curPivBarIdx];> > aHPivIdxs[nHPivs] = curPivBarIdx;> 
  > nHPivs++;> > }> > // -- If curTrend is 
  up...else...> > }> > // -- loop through 
  bars> > }> > // -- Basic attempt to add a pivot 
  this logic may have missed> > // -- OK, now I want to look at 
  last two pivots. If the most> > // recent low pivot is after the 
  last high, I could> > // still have a high pivot that I didn't 
  catch> > // -- Start at last bar> > curBar = 
  (BarCount-1);> > candIdx = 0;> > candPrc = 
  0;> > lastLPIdx = aLPivIdxs[0];> > lastLPL = 
  aLPivLows[0];> > lastHPIdx = aHPivIdxs[0];> > 
  lastHPH = aHPivHighs[0];> > if (lastLPIdx > lastHPIdx) 
  {> > // -- Bar and price info for candidate pivot> 
  > candIdx = curBar - aHHVBars[curBar];> > candPrc = 
  aHHV[curBar];> > if (> > lastHPH < candPrc 
  AND> > candIdx > lastLPIdx AND> > candIdx < 
  curBar) {> > > > // -- OK, we'll add this as a 
  pivot...> > aHPivs[candIdx] = 1;> > // ...and then 
  rearrange elements in the> > // pivot information arrays> 
  > for (j=0; j<nHPivs; j++) {> > aHPivHighs[nHPivs-j] = 
  aHPivHighs[nHPivs-> > (j+1)];> > 
  aHPivIdxs[nHPivs-j] = aHPivIdxs[nHPivs-(j+1)];> > }> 
  > aHPivHighs[0] = candPrc ;> > aHPivIdxs[0] = 
  candIdx;> > nHPivs++;> > }> > } else 
  {> > > > // -- Bar and price info for candidate 
  pivot> > candIdx = curBar - aLLVBars[curBar];> > 
  candPrc = aLLV[curBar];> > if (> > lastLPL > 
  candPrc AND> > candIdx > lastHPIdx AND> > 
  candIdx < curBar) {> > > > // -- OK, we'll add 
  this as a pivot...> > aLPivs[candIdx] = 1;> > // 
  ...and then rearrange elements in the> > // pivot information 
  arrays> > for (j=0; j<nLPivs; j++) {> > 
  aLPivLows[nLPivs-j] = aLPivLows[nLPivs-(j+1)];> > 
  aLPivIdxs[nLPivs-j] = aLPivIdxs[nLPivs-(j+1)];> > }> 
  > aLPivLows[0] = candPrc;> > aLPivIdxs[0] = 
  candIdx;> > nLPivs++;> > }> > 
  }> > // -- Dump inventory of high pivots for debugging> 
  > /*> > for (k=0; k<nHPivs; k++) {> > 
  _TRACE("High pivot no. " + k> > + " at barindex: " + 
  aHPivIdxs[k] + ", "> > + 
  WriteVal(ValueWhen(BarIndex()==aHPivIdxs[k],> > DateTime(), 1), 
  formatDateTime)> > + ", " + aHPivHighs[k]);> > 
  }> > */> > // -- OK, let's plot the pivots using 
  arrows> > PlotShapes( IIf(aHPivs==1, shapeDownArrow, shapeNone), 
  colorRed, 0,High,> Offset=-15);> > 
  PlotShapes(IIf(aLPivs==1, shapeUpArrow , shapeNone), colorGreen, 0, 
  Low,> Offset=-15);> > ////////////////////////////// 
  end Pivots Section> > TestValue = L;> > Param1 = 
  Param( "Param1", .2, 0.00, 1.00, .001 );> > xx= Param1 ;> 
  > TV1 = H *xx;> > TV2 = L *-1*(xx);> > TV3 
  = TV1 - TV2;> > TV4 = TestValue - TV3;> > TV5 = 
  MA(TV4,7)/.6;> > TV6 = ((H+C)/2) - TV3;> > TV7 = 
  MA(TV6,7)/.6;> > TV8 = (TV5 + TV7)/2;> > > 
  > Len4 = Param( "Len4", 89, 0, 1000, .001 );> > MAC = 
  MA(C,Len4 );> > //Plot (Close,"Close",1,128);> > 
  //Plot(TV4,"TV4",6,4);> > Plot(TV5,"TV5",5,4);> > 
  Plot(TV7,"TV7",4,4);> > Plot(Avg,"Avg",colorYellow,4);> 
  > Plot(TV8,"TV8",2,4);> > Plot(MAC,"MA 
  Close(89)",6,styleDots);> > Plot(Close, EncodeColor(colorWhite) 
  +"Close " ,1,128);> > GraphXSpace =4;> > 
  //////////////////////////////////////////////////////////////////INDICATOR> 
  #1 END> > > > 
  //////////////////////////////////////////////////////////////////INDICATOR> 
  #2 BEGIN> > /*MACD Custom V3 */> > /* MACD TRIX v1 
  */> > Var1 = Param( "Test1", 30, 0, 900, .001 );> 
  > Var2 = Param( "Test2", 10, 0, 900, .001 );> > Var3 = 
  Param( "Test3", 8, 0, 900, .001 );> > //MACD> > X 
  = Avg; //OBV();> > ms = Var1 ;> > mf = 
  Var2;> > mg =Var3 ;> > myMACD = DEMA(X,mf) - 
  DEMA(X,ms);> > mySignal = DEMA(myMACD,mg);> > 
  Plot(myMACD,"myMACD v1",colorBlue,styleLine);> > 
  Plot(mySignal,"mySig",colorRed,styleLine);> > //////> 
  > Buynow = myMACD > mySignal;> > SellNow = myMACD 
  <mySignal;> > Plot(15, /* defines the height of the ribbon in 
  percent of pane width */"My> MACD",IIf( BuyNow, colorGreen, IIf( 
  SellNow, colorRed, 7 )), /* choose> 
  color*/styleOwnScale|styleArea|styleNoLabel, -0.5, 100);> > 
  GraphXSpace =4;> > 
  ////////////////////////////////////////////// INDICATOR # 2 END> 
  > > > ////////////////////////////////////////////// 
  INDICATOR #3 BEGIN> > /* Cubic Polyoimial Envelopes */> 
  > /* Author Mr Valley (c)2003 */> > > > 
  time = 89;> > startlevel =DEMA(Ref(Avg,-2.0),4);> 
  > midlevel = DEMA(C,2);> > endlevel = 
  DEMA(Ref(H,-2.0),7);> > k = startlevel + endlevel - (midlevel * 
  2);> > r = startlevel;> > s = (endlevel - 
  startlevel - (2 * k)) / time;> > t = (2 * k) / (time * 
  time);> > bigr = r;> > bigs = s + t;> 
  > bigt = 2 * t;> > for(int( i=0); i<time;i++);> 
  > {> > bigr = bigr + bigs;> > bigs = bigs + 
  bigt;> > }> > Plot(bigr,"bigr",5,4);> 
  > Plot(bigs+L,"bigs",4,4);> > 
  Plot(Close,"C",1,4);> > Buynow = C>bigr;> > 
  SellNow =bigr> C;> > Plot(10, /* defines the height of the 
  ribbon in percent of pane width> */"",IIf( BuyNow, colorGreen, IIf( 
  SellNow, colorRed, 7 )), /* choose> 
  color*/styleOwnScale|styleArea|styleNoLabel, -0.5, 100);> > 
  Plot(Close ,"Close" + EncodeColor( colorWhite ) ,2, styleNoLine |> 
  styleNoRescale );> > GraphXSpace = 4;> > 
  ///////////////////////////////////////////////////// INDICATOR #3 
  END> > Ok, awaiting feedback...> > > Mr 
  ValleC>   -----Original Message----->   
  From: Mr Valley [mailto:valleymj@xxxx]>   Sent: Thursday, 
  January 29, 2004 5:26 PM>   To: 
  amibroker@xxxxxxxxxxxxxxx>   Subject: RE: [AmiBroker] Re: 
  Successive Approximation in fall> > >   
  Dimitris,> >   Thank you.>   The 
  depth of your AmiBroker skill is amazing.> >   Mr. 
  Valley>     -----Original 
  Message----->     From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxx]>     Sent: Thursday, January 
  29, 2004 7:32 AM>     To: 
  amibroker@xxxxxxxxxxxxxxx>     Subject: [amibroker] 
  Re: Successive Approximation in fall> > 
  >     This limitation is due to the endless loop 
  detection threshold [see>     comments below] 
  in your preferences. In my amibroker it was 
  100,000,>     so if the steps of the loop are 
  >100,000 it is "endless".>     Dimitris 
  Tsokakis> >     --- In 
  amibroker@xxxxxxxxxxxxxxx, "Mr Valley" <valleymj@xxxx> 
  wrote:>     > Why does one get an error 
  message if you change precision to 8?>     > 
  Is this a limitation within AB?  Shouldn't one be able to set it 
  to>     any>     > 
  number?>     > Mr. 
  Valley>     >   -----Original 
  Message----->     >   From: DIMITRIS 
  TSOKAKIS [mailto:TSOKAKIS@xxxx]>     
  >   Sent: Thursday, January 29, 2004 4:57 
  AM>     >   To: 
  amibroker@xxxxxxxxxxxxxxx>     >   
  Subject: [amibroker] Re: Successive Approximation in 
  afl>     >>     
  >>     >   
  Herman,>     >   We may have another 
  approach through while() statement.>     
  >   [For the simplicity, the //next decimals are in a loop 
  form ]>     
  >>     >   //Sqrt(X) 
  approximation>     >   
  X=2;Precision=7;>     >   
  a=1;b=2;>     >   st0=0.1;//the 
  initial step>     >   
  z=0;>     >   //1st 
  decimal>     >   
  i=a;>     >   
  while(i^2<X)>     >   
  {>     >   
  z=i;>     >   
  i=i+st0;>     >   
  }>     >   //next 
  decimals>     >   
  for(n=1;n<Precision;n++)>     >   
  {>     >   
  st0=0.1*st0;>     >   
  i=z;>     >   
  while(i^2<x)>     >   
  {>     >   
  z=i;>     >   
  i=i+st0;>     >   
  }>     >   
  }>     >   
  Title="Sqrt("+WriteVal(X,1.0)+")="+WriteVal(z,1+0.1*n);>     
  >>     >   When we have the 
  Sqrt(2)=1.41, the next loop will search 
  1.411,>     >   1.412, 1.413, 
  1.414, 1.415 and will stop there, since 1.415 
  gives>     >   false 
  output.>     >   In this way, the 3rd 
  loop needs 5 steps instead of 10. Since>     
  decimals>     >   will be equally 
  disributed below and above 5 [I hope you 
  dont>     
  always>     >   search an 1.99999 !!] 
  we gain many steps.>     >   Without 
  this, one should begin from 1 and search every 0.00001 
  up>     to>     
  >   1.41421.>     >   
  This is done by the full code>     
  >>     >   //Sqrt(X) full 
  approximation>     >   
  X=2;Precision=5;>     >   
  a=1;b=2;>     >   
  st0=10^(-Precision);//the initial step>     
  >   z=0;>     >   
  //decimals>     >   
  i=a;>     >   
  while(i^2<X)>     >   
  {>     >   
  z=i;>     >   
  i=i+st0;>     >   
  }>     >   
  Title="Sqrt("+WriteVal(X,1.0)+")="+WriteVal(z,1+0.1*Precision);>     
  >>     >   and it is not the best 
  choice !!>     >>     
  >   A simple criterion to see the difference, is your endless 
  loop>     >   detection 
  threshold.>     >   If it is set, for 
  example, to 100000 iterations, the first 
  method>     >   will permit 
  Precision=7 whereas the 2nd[full] method will not 
  go>     more>     
  >   than Precision=5.>     
  >>     >   The steps of the 1st 
  method depend on the result : You will not 
  be>     >   that lucky with 
  Sqrt(3.56). It is 1.886796, all the decimal 
  digits>     >   are >5 and the 
  steps per digit will be 9+9+7+8+10+7>     
  respectively !!>     >   It is much 
  better to search Sqrt(2.2811), it is 1.510331 and 
  will>     >   take 6+2+1+4+4+2 steps 
  per digit.>     >   You may also put a 
  small counter to count the total steps of 
  the>     >   approximation, it is 
  interesting.>     >   Dimitris 
  Tsokakis>     >>     
  >>     >>     
  >>     >   --- In 
  amibroker@xxxxxxxxxxxxxxx, "Herman 
  vandenBergen">     
  <psytek@xxxx>>     >   
  wrote:>     >   > Thank you DT, as 
  usual your reply is not only informative 
  but>     >   
  entertaining>     >   > :-) an 8x 
  improvement in speed would be just fine. If my 
  own>     >   solution 
  is>     >   > general I will post 
  it.>     >   
  >>     >   > I think I received 
  enough ideas to try a few things, solving 
  a>     small>     
  >   > challenge with your owninput is half the fun and a 
  better way to>     >   
  learn.>     >   
  >>     >   > Thanks everybody 
  and have a great day!>     >   > 
  herman>     >   >   
  -----Original Message----->     >   
  >   From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxx]>     >   
  >   Sent: January 29, 2004 2:16 
  AM>     >   >   To: 
  amibroker@xxxxxxxxxxxxxxx>     >   
  >   Subject: [amibroker] Re: Successive Approximation in 
  afl>     >   
  >>     >   
  >>     >   >   
  Herman,>     >   >   my 
  method is a bit different.>     >   
  >   I begin with the 1st digit accuracy [10 steps maximum, 
  1.0 to>     
  1.9]>     >   >   and 
  localize>     >   >   
  1.4<sqrt(2)<1.5>     >   
  >   Then, for the 2nd digit, 10 steps [maximum] again to 
  obtain>     >   >   
  1.41<sqrt(2)<1.42>     >   
  >   and so on.>     >   
  >   In the average, I need 5 steps per digit and, for a 
  3-decimal>     >   
  >   accuracy it will take about>     
  >   >   5*5*5=125 steps instead of the normal 
  1000.>     >   >   
  Archimedes, the copyright of the method, was not working 
  with>     >   >   
  decimals.>     >   >   
  For some reason [not explained anywhere],  his first 
  choice>     was>     
  >   the>     >   
  >   sevenths of the unity 1/7, 2/7, 3/7 etc 
  .>     >   >   So, in his 
  famous "Measurement of a Circle", he proves 
  that>     >   >   
  3+1/7>pi>3+10/71>     >   
  >   As you see, he slightly increases the denominator [he 
  does not>     >   >   
  increase the numerator].>     >   
  >   There are some obscure statements, he never explained, 
  for>     >   
  example,>     >   >   how 
  did he came to the [useful approximation]>     
  >   >   265/153<sqrt(3)<1351/780 
  [!!!].>     >   >   but, 
  we can not always have what we want...>     
  >   >   Dimitris 
  Tsokakis>     >   >   --- 
  In amibroker@xxxxxxxxxxxxxxx, "Herman 
  vandenBergen">     >   
  <psytek@xxxx>>     >   
  >   wrote:>     >   
  >   > thanks DT, I have to study your code but I think you 
  have>     the>     
  >   >   general 
  idea.>     >   >   > I 
  have an impossible formula to transform (it contains 
  HHV>     and>     
  >   LLVs,>     >   
  >   > stochastic mutation) and want to find the x that 
  would give>     
  me>     >   
  the>     >   >   given 
  y.>     >   >   > 
  Right now I linearly increment x untill I hit my 
  y-target,>     >   this 
  is>     >   >   
  awfully>     >   >   > 
  slow.>     >   >   
  >>     >   >   > 
  like y = function(x); // y ranges 0-100 and I want 2 
  decimal>     >   
  places>     >   >   for 
  x>     >   >   > that 
  gives me a given y>     >   
  >   >>     >   
  >   > I thought cutting the range in half, see whether it 
  is>     greater>     
  >   or>     >   
  >   less, cut>     >   
  >   > the result in half again, etc. I am not a math guy 
  but I>     have>     
  >   used>     >   
  >   > AD-converters that worked like that and what we can 
  do in>     >   
  hardware>     >   >   we 
  can do>     >   >   > 
  in software :-)>     >   
  >   >>     >   
  >   > thanks for the starter 
  DT,>     >   >   > 
  herman>     >   >   
  >>     >   >   
  >>     >   >   
  >>     >   >   
  >>     >   >   
  >  -----Original Message----->     
  >   >   > From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxx]>     >   
  >   > Sent: January 28, 2004 9:18 
  PM>     >   >   > To: 
  amibroker@xxxxxxxxxxxxxxx>     >   
  >   > Subject: [amibroker] Re: Successive Approximation in 
  afl>     >   >   
  >>     >   >   
  >>     >   >   
  >   Herman,>     >   
  >   >   You mean a procedure like 
  this>     >   >   
  >>     >   >   
  >   a=1;b=2;z=0;>     >   
  >   >   
  st0=0.1;st1=0.01;st2=0.01;>     >   
  >   >   //1st 
  decimal>     >   >   
  >   for(i=a;i<b;i=i+st0)>     
  >   >   >   
  {>     >   >   
  >   if(i^2<2 AND 
  (i+st0)^2>2)>     >   
  >   >   z=i;>     
  >   >   >   
  }>     >   >   
  >   //2nd decimal>     
  >   >   >   
  for(i=z;i<z+st0;i=i+st1)>     >   
  >   >   {>     
  >   >   >   if(i^2<2 AND 
  (i+st1)^2>2)>     >   
  >   >   z=i;>     
  >   >   >   
  }>     >   >   
  >   //...etc>     >   
  >   >   
  Plot(z,"sqrt(2)",1,1);>     >   
  >   >>     >   
  >   >   to find sqrt(2) without using all the values 
  from 1 to 2 ?>     >   
  >   >   Dimitris 
  Tsokakis>     >   >   
  >   --- In amibroker@xxxxxxxxxxxxxxx, "Herman 
  vandenBergen">     >   
  >   <psytek@xxxx>>     
  >   >   >   
  wrote:>     >   >   
  >   > Hello,>     >   
  >   >   >>     
  >   >   >   > has anybody come 
  accross a successive approximation>     
  routine>     >   
  in>     >   >   
  afl?>     >   >   
  >   Or>     >   
  >   >   > perhaps 
  js?>     >   >   
  >   >>     >   
  >   >   > thanks,>     
  >   >   >   > 
  herman>     >   >   
  >>     >   >   
  >>     >   >   
  >>     >   >   
  >   Send BUG REPORTS to bugs@xxxx>     
  >   >   >   Send SUGGESTIONS to 
  suggest@xxxx>     >   >   
  >   
  ----------------------------------------->     
  >   >   >   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>     
  >   >   >>     
  >   >   >>     
  >   >   >>     
  >   >   > 
  ------------------------------------------------------------>     
  ---->     >   
  ---->     >   >   
  -------->     >   >   
  > -->     >   >   
  >   Yahoo! Groups Links>     
  >   >   >>     
  >   >   >     a.. To visit 
  your group on the web, go to:>     >   
  >   >     <A 
  href="">http://groups.yahoo.com/group/amibroker/>     
  >   >   >>     
  >   >   >     b.. To 
  unsubscribe from this group, send an email 
  to:>     >   >   
  >     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx>     
  >   >   >>     
  >   >   >     c.. Your use of 
  Yahoo! Groups is subject to the Yahoo!>     
  >   Terms of>     >   
  >   Service.>     >   
  >>     >   
  >>     >   
  >>     >   >   Send 
  BUG REPORTS to bugs@xxxx>     >   
  >   Send SUGGESTIONS to 
  suggest@xxxx>     >   >   
  ----------------------------------------->     
  >   >   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>     
  >   >>     >   
  >>     >   
  >>     >   > 
  ---------------------------------------------------------------->     
  ---->     >   
  -------->     >   > 
  -->     >   >   Yahoo! 
  Groups Links>     >   
  >>     >   
  >     a.. To visit your group on the web, go 
  to:>     >   
  >     <A 
  href="">http://groups.yahoo.com/group/amibroker/>     
  >   >>     >   
  >     b.. To unsubscribe from this group, send an email 
  to:>     >   
  >     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx>     
  >   >>     >   
  >     c.. Your use of Yahoo! Groups is subject to the 
  Yahoo!>     Terms 
  of>     >   
  Service.>     >>     
  >>     >>     
  >   Send BUG REPORTS to bugs@xxxx>     
  >   Send SUGGESTIONS to 
  suggest@xxxx>     >   
  ----------------------------------------->     
  >   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>     
  >>     >>     
  >>     > 
  -------------------------------------------------------------------->     
  -------->     > 
  -->     >   Yahoo! Groups 
  Links>     >>     
  >     a.. To visit your group on the web, go 
  to:>     >     <A 
  href="">http://groups.yahoo.com/group/amibroker/>     
  >>     >     b.. To 
  unsubscribe from this group, send an email to:>     
  >     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx>     
  >>     >     c.. Your use 
  of Yahoo! Groups is subject to the Yahoo! Terms 
  of>     Service.> > > 
  >     Send BUG REPORTS to 
  bugs@xxxx>     Send SUGGESTIONS to 
  suggest@xxxx>     
  ----------------------------------------->     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> 
  > > > 
  ---------------------------------------------------------------------------->     
  Yahoo! Groups Links> >       a.. 
  To visit your group on the web, go 
  to:>       <A 
  href="">http://groups.yahoo.com/group/amibroker/> 
  >       b.. To unsubscribe from this 
  group, send an email to:>       
  amibroker-unsubscribe@xxxxxxxxxxxxxxx> 
  >       c.. Your use of Yahoo! Groups is 
  subject to the Yahoo! Terms of> Service.> > > 
  > >   Send BUG REPORTS to 
  bugs@xxxx>   Send SUGGESTIONS to 
  suggest@xxxx>   
  ----------------------------------------->   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> 
  > > > 
  ----------------------------------------------------------------------------> 
  -->   Yahoo! Groups Links> 
  >     a.. To visit your group on the web, go 
  to:>     <A 
  href="">http://groups.yahoo.com/group/amibroker/> 
  >     b.. To unsubscribe from this group, send an 
  email to:>     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx> >     
  c.. Your use of Yahoo! Groups is subject to the 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 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


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.