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

Re: [amibroker] Re:OT Hard drive backup



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>DT,
<FONT face=Arial color=#0000ff 
size=2> 
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)  
:>)
<FONT face=Arial color=#0000ff 
size=2> 
You 
now, therefore Top == Top;
<FONT face=Arial color=#0000ff 
size=2> 
Any 
genius-like  thoughts would be greatly appreciated.
<FONT face=Arial color=#0000ff 
size=2> 
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;
<FONT face=Arial color=#0000ff 
size=2> 
Oh 
well, close enough for, whatchamacallit work.
<FONT face=Arial color=#0000ff 
size=2> 
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... 

<FONT face=Arial color=#0000ff 
size=2> 
It's 
Close, but Any thoughts appreciated... (Pal, does it work on FOREX?  Or is 
is humbly, back to the artistic pad...)  :>)
<FONT face=Arial color=#0000ff 
size=2> 
MV 

<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>////////////////////////////////////////////////////INDICATOR #1 BEGIN 
///////// Paste Each in SEPARATE IB Windows 
/////////////////////
/* MV Test 
v1*/
/////////////////////////////// Pivots section 

/* Pivots Automatically */<FONT 
size=1>
/* ***********************************/<FONT 
color=#008000 size=1>
//Code to automatically identify pivots<FONT 
color=#008000 size=1>
/*********************************** */<FONT 
color=#008000 size=1>
// -- what will be our lookback range for the hh and ll?<FONT 
size=1>
nBars = Param<FONT 
size=1>("Number of bars", 
12, <FONT 
color=#ff00ff size=1>5, <FONT color=#ff00ff 
size=1>40);
// -- Title.
//Title = Name() + " (" + StrLeft(FullName(), 15) + ") O: " + Open + ", H: " 
+ High + ", L: " + Low + ", C: " + Close;<FONT 
color=#008000 size=1>
// -- Plot basic candle chart<FONT 
color=#008000 size=1>
//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<FONT 
size=1>
aHPivs = H - H;
aLPivs = L - L;
// -- More for future use, not necessary for basic plotting<FONT 
size=1>
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<FONT 
size=1>;
// -- looking back from the current bar, how many bars <FONT 
size=1>
// back were the hhv and llv values of the previous <FONT 
size=1>
// n bars, etc.?
aHHVBars = HHVBars<FONT 
size=1>(H, nBars);
aLLVBars = LLVBars<FONT 
size=1>(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 <FONT 
size=1>
// _Trace output will show a value of 0
aVisBars = Status<FONT 
size=1>("barvisible");
nLastVisBar = LastValue<FONT 
size=1>(Highest<FONT 
size=1>(IIf(aVisBars, 
BarIndex(), <FONT 
color=#ff00ff size=1>0)));<FONT color=#0000ff 
size=1>
_TRACE("Last visible 
bar: " + nLastVisBar);
// -- Initialize value of curTrend
curBar = (BarCount-1<FONT 
size=1>);
curTrend = ""<FONT 
size=1>;
if (aLLVBars[curBar] < 
aHHVBars[curBar]) {
curTrend = "D";
}
else {
curTrend = "U";
}
// -- Loop through bars. Search for <FONT 
color=#008000 size=1>
// entirely array-based approach<FONT 
color=#008000 size=1>
// in future version<FONT color=#008000 
size=1>
//for (i=0; i<100; i++) {
for (i=<FONT color=#ff00ff 
size=1>0; i<<FONT color=#ff00ff 
size=1>255 AND BarCount > <FONT 
color=#ff00ff size=1>255; i++) {
 
curBar = (BarCount - 1<FONT 
size=1>) - i;
// -- Have we identified a pivot? If trend is down...<FONT 
size=1>
if (aLLVBars[curBar] < aHHVBars[curBar]) 
{
// ... and had been up, this is a trend change<FONT 
size=1>
if (curTrend == <FONT color=#ff00ff 
size=1>"U") {
curTrend = "D"<FONT 
size=1>;
// -- Capture pivot information
curPivBarIdx = curBar - aLLVBars[curBar];
aLPivs[curPivBarIdx] = 1<FONT 
size=1>;
aLPivLows[nLPivs] = L[curPivBarIdx];
aLPivIdxs[nLPivs] = curPivBarIdx;
nLPivs++;
}
// -- or current trend is up
} else 
{
if (curTrend == <FONT color=#ff00ff 
size=1>"D") {
curTrend = "U";
curPivBarIdx = curBar - aHHVBars[curBar];
aHPivs[curPivBarIdx] = 1<FONT 
size=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<FONT 
size=1>
// -- OK, now I want to look at last two pivots. If the most <FONT 
size=1>
// recent low pivot is after the last high, I could<FONT 
size=1>
// still have a high pivot that I didn't catch<FONT 
size=1>
// -- Start at last bar
curBar = (BarCount-1<FONT 
size=1>);
candIdx = 0;
candPrc = 0;
lastLPIdx = aLPivIdxs[0<FONT 
size=1>];
lastLPL = aLPivLows[0<FONT 
size=1>];
lastHPIdx = aHPivIdxs[0<FONT 
size=1>];
lastHPH = aHPivHighs[0<FONT 
size=1>];
if (lastLPIdx > lastHPIdx) {<FONT 
color=#008000 size=1>
// -- 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<FONT 
size=1>;
// ...and then rearrange elements in the <FONT 
color=#008000 size=1>
// pivot information arrays<FONT 
color=#800000 size=1>
for (j=<FONT color=#ff00ff 
size=1>0; j<nHPivs; j++) {
aHPivHighs[nHPivs-j] = aHPivHighs[nHPivs-
(j+1)];
aHPivIdxs[nHPivs-j] = aHPivIdxs[nHPivs-(j+<FONT color=#ff00ff 
size=1>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<FONT 
size=1>;
// ...and then rearrange elements in the <FONT 
color=#008000 size=1>
// pivot information arrays<FONT 
color=#800000 size=1>
for (j=<FONT color=#ff00ff 
size=1>0; j<nLPivs; j++) {
aLPivLows[nLPivs-j] = aLPivLows[nLPivs-(j+<FONT color=#ff00ff 
size=1>1)];
aLPivIdxs[nLPivs-j] = aLPivIdxs[nLPivs-(j+<FONT color=#ff00ff 
size=1>1)];
}
aLPivLows[0] = 
candPrc;
aLPivIdxs[0] = 
candIdx;
nLPivs++;
}
}
// -- Dump inventory of high pivots for debugging<FONT 
size=1>
/*
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<FONT 
size=1>
PlotShapes( <FONT color=#0000ff 
size=1>IIf(aHPivs==<FONT color=#ff00ff 
size=1>1, shapeDownArrow, shapeNone), 
colorRed, 0<FONT 
size=1>,High, Offset=-15<FONT 
size=1>);
PlotShapes(<FONT color=#0000ff 
size=1>IIf(aLPivs==<FONT color=#ff00ff 
size=1>1, shapeUpArrow , shapeNone), 
colorGreen, 0, 
Low, Offset=-15<FONT 
size=1>);
////////////////////////////// end Pivots Section 
TestValue = L;
Param1 = Param( 
"Param1", .2, <FONT 
color=#ff00ff size=1>0.00, <FONT color=#ff00ff 
size=1>1.00, .001 );
xx= Param1 ;
TV1 = H *xx;
TV2 = L *-1<FONT 
size=1>*(xx);
TV3 = TV1 - TV2;
TV4 = TestValue - TV3;
TV5 = MA<FONT 
size=1>(TV4,7)/.6;
TV6 = ((H+C)/2<FONT 
size=1>) - TV3;
TV7 = MA<FONT 
size=1>(TV6,7)/.6;
TV8 = (TV5 + TV7)/2<FONT 
size=1>;
 
Len4 = Param( 
"Len4", <FONT 
color=#ff00ff size=1>89, <FONT color=#ff00ff 
size=1>0, 1000<FONT 
size=1>, .001 );
MAC = MA(C,Len4 
);
//Plot (Close,"Close",1,128);
//Plot(TV4,"TV4",6,4);
Plot(TV5,<FONT color=#ff00ff 
size=1>"TV5",5<FONT 
size=1>,4<FONT 
size=1>);
Plot(TV7,<FONT color=#ff00ff 
size=1>"TV7",4<FONT 
size=1>,4<FONT 
size=1>);
Plot(Avg,<FONT color=#ff00ff 
size=1>"Avg",colorYellow,<FONT color=#ff00ff 
size=1>4);
Plot(TV8,<FONT color=#ff00ff 
size=1>"TV8",2<FONT 
size=1>,4<FONT 
size=1>);
Plot(MAC,"MA 
Close(89)",6<FONT 
size=1>,styleDots);
Plot(Close, <FONT color=#0000ff 
size=1>EncodeColor(colorWhite) +<FONT 
color=#ff00ff size=1>"Close " ,<FONT color=#ff00ff 
size=1>1,128<FONT 
size=1>);
GraphXSpace =4<FONT 
size=1>;
<SPAN 
class=703122101-30012004>//////////////////////////////////////////////////////////////////INDICATOR 
#1 END
<SPAN 
class=703122101-30012004> 
<SPAN 
class=703122101-30012004> 
<SPAN 
class=703122101-30012004> 
<SPAN 
class=703122101-30012004>//////////////////////////////////////////////////////////////////INDICATOR 
#2 BEGIN
<SPAN 
class=703122101-30012004> 

/*MACD Custom V3 
*/
/* MACD TRIX v1 
*/
Var1 = <FONT color=#0000ff 
size=1>Param( <FONT color=#ff00ff 
size=1>"Test1", <FONT color=#ff00ff 
size=1>30, 0<FONT 
size=1>, 900<FONT 
face=Arial>, .001 );
Var2 = <FONT color=#0000ff 
size=1>Param( <FONT color=#ff00ff 
size=1>"Test2", <FONT color=#ff00ff 
size=1>10, 0<FONT 
size=1>, 900<FONT 
face=Arial>, .001 );
Var3 = <FONT color=#0000ff 
size=1>Param( <FONT color=#ff00ff 
size=1>"Test3", <FONT color=#ff00ff 
size=1>8, 0<FONT 
size=1>, 900, .001 
);
//MACD 
X = Avg; <FONT color=#008000 
size=1>//OBV();
ms = Var1 ;
mf = Var2;
mg =Var3 ;
myMACD = <FONT color=#0000ff 
size=1>DEMA(X,mf) - <FONT color=#0000ff 
size=1>DEMA(X,ms);
mySignal = <FONT 
color=#0000ff size=1>DEMA(myMACD,mg);<FONT 
color=#0000ff size=1>
Plot<FONT color=#000000 
size=1>(myMACD,"myMACD v1"<FONT 
size=1><FONT 
color=#000000>,colorBlue,styleLine);<FONT 
color=#0000ff size=1>
Plot<FONT color=#000000 
size=1>(mySignal,"mySig"<FONT 
size=1><FONT 
color=#000000>,colorRed,styleLine);<FONT 
face=Arial color=#008000 size=1>
//////
Buynow = myMACD > mySignal;
SellNow = myMACD <mySignal;<FONT 
color=#0000ff size=1>
Plot<FONT color=#000000 
size=1>(15, 
/* defines the height of the ribbon in percent 
of pane width */"My MACD"<FONT 
color=#000000 size=1>,IIf<FONT 
color=#000000 size=1>( BuyNow, colorGreen, <FONT color=#0000ff 
size=1>IIf( SellNow, colorRed, 
7 )), 
/* choose color*/<FONT 
color=#000000>styleOwnScale<FONT 
color=#000000>|styleArea|styleNoLabel, -<FONT 
face=Arial>0.5, 
100<FONT face=Arial 
color=#000000>);
GraphXSpace =<FONT 
face=Arial>4;
<FONT face=Arial 
size=2>////////////////////////////////////////////// INDICATOR # 2 END 

<SPAN 
class=703122101-30012004> 
<FONT face=Arial 
size=2>////////////////////////////////////////////// INDICATOR #3 
BEGIN<SPAN 
class=703122101-30012004>
/* Cubic Polyoimial 
Envelopes */
/* Author Mr Valley (c)2003 */<FONT 
size=1>
 
time = <FONT face=Arial color=#ff00ff 
size=1>89;
startlevel =<FONT 
color=#0000ff size=1>DEMA(<FONT color=#0000ff 
size=1>Ref(Avg,-<FONT color=#ff00ff 
size=1>2.0),<FONT color=#ff00ff 
size=1>4);
midlevel = <FONT 
color=#0000ff size=1>DEMA(C,<FONT 
color=#ff00ff size=1>2);
endlevel = <FONT 
color=#0000ff size=1>DEMA(<FONT color=#0000ff 
size=1>Ref(H,-<FONT color=#ff00ff 
size=1>2.0),<FONT color=#ff00ff 
size=1>7);
k = startlevel + endlevel - (midlevel * <FONT 
face=Arial color=#ff00ff size=1>2<FONT 
face=Arial>);
r = startlevel;
s = (endlevel - startlevel - (<FONT face=Arial 
color=#ff00ff size=1>2 * k)) / 
time;
t = (<FONT face=Arial color=#ff00ff 
size=1>2 * k) / (time * time);
bigr = r;
bigs = s + t;
bigt = <FONT color=#ff00ff 
size=1>2 * t;<FONT color=#800000 
size=1>
for<FONT color=#000000 
size=1>(int( 
i=0<FONT face=Arial 
color=#000000>); i<time;i++);
{
bigr = bigr + bigs;
bigs = bigs + bigt;
}
Plot<FONT color=#000000 
size=1>(bigr,"bigr"<FONT color=#000000 
size=1>,5<FONT color=#000000 
size=1>,4<FONT 
color=#000000>);
Plot<FONT color=#000000 
size=1>(bigs+L,"bigs"<FONT 
color=#000000 size=1>,4<FONT 
color=#000000 size=1>,4<FONT 
size=1>);<FONT color=#0000ff 
size=1>
Plot<FONT color=#000000 
size=1>(Close,"C"<FONT 
color=#000000 size=1>,1<FONT 
color=#000000 size=1>,4<FONT 
size=1>);
Buynow = C>bigr;
SellNow =bigr> C; <FONT 
color=#0000ff size=1>
Plot<FONT color=#000000 
size=1>(10, 
/* defines the height of the ribbon in percent 
of pane width */""<FONT color=#000000 
size=1>,IIf( 
BuyNow, colorGreen, IIf<FONT 
color=#000000 size=1>( SellNow, colorRed, <FONT color=#ff00ff 
size=1>7 )), <FONT color=#008000 
size=1>/* choose color*/<FONT 
color=#000000>styleOwnScale<FONT 
color=#000000>|styleArea|styleNoLabel, -<FONT 
face=Arial>0.5, 
100<FONT 
color=#000000>);
Plot<FONT color=#000000 
size=1>(Close ,"Close"<FONT 
color=#000000 size=1> + <FONT color=#0000ff 
size=1>EncodeColor( colorWhite ) 
,2<FONT face=Arial 
color=#000000>, styleNoLine | styleNoRescale );
GraphXSpace = 
4<FONT 
size=1>;
<FONT face=Arial 
size=2>///////////////////////////////////////////////////// INDICATOR #3 
END
Ok, 
awaiting 
feedback...
<FONT face=Arial color=#0000ff 
size=2> 
Mr 
ValleC

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Mr Valley 
  [mailto:valleymj@xxxxxxxxxxx]Sent: Thursday, January 29, 2004 5:26 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [AmiBroker] 
  Re: Successive Approximation in fall
  Dimitris<SPAN 
  class=906382300-30012004>,
  <SPAN 
  class=906382300-30012004> 
  Thank 
  you.   The depth of your AmiBroker skill is 
  amazing.
  <SPAN 
  class=906382300-30012004> 
  Mr. 
  Valley
  
    <FONT face=Tahoma 
    size=2>-----Original Message-----From: DIMITRIS TSOKAKIS 
    [mailto:TSOKAKIS@xxxxxxxxx]Sent: Thursday, January 29, 2004 7:32 
    AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
    Re: Successive Approximation in fallThis 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@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@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.