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

Re: [amibroker] Re: Need help with analysis/commentary



PureBytes Links

Trading Reference Links

Hi Cliff,

> Now the issue at hand:
> You are correct that if I change the formula I will get the buy on 
> 5/22 - but I think that this would be incorrect usage of the SAR.
> 
> 1. On 5/21 the SAR was 30.2 - this becomes the STOP price for trading 
> on 5/22 (to exit the short and enter a long position). 
> 2. Actual prices on 5/22 were: O/C/H/L 26.43/29.67/29.70/26.41 
> 3. The price did not reach the SAR (STOP) on 5/22, so the SAR should 
> not reverse and there should not be an entry point.
> 
> I would like to know what condition (and the corresponding price) 
> causes the SAR to reverse - because that is the condition that I can 
> use to generate buyPrice/sellPrice values. 
> Then in my model I can use the ref ( sar(), -1 ) to accurately get the 
> actual trade price.

OK, You are right I forgot to tell you about one thing.
Yes, you should use ref( SAR( -1 ) ) as your buyprice and sellprice
because this is the only way of getting correct trade price (stop order level).
There is one caveat in this approach:
if the market opens below/above SAR() trigger level your stop is automatically
executed at open, so the following correction to the buy/sell price is needed:

buyPrice = Max( ref (sar(), -1), Open ); 
sellPrice = Min( ref( sar(), -1), Open );


But you should know that cross() function checks actually two points
to detect crossing - 
cross( array1, array2 ) is equivalent to
ref( array1, -1 ) <= ref( array2, -1 ) AND array1 > array2

so it can not check SAR() reversal for the last bar IF you are using ref( SAR( -1 ) )
- one day old value - as a trigger.

So the solution should be:
use corrected Ref( SAR(), -1 ) in buyprice and sellprice assignments,
BUT use plain SAR() as a trigger (because of the way cross function works):

/* SAR corrected */

buyPrice = Max( ref (sar(), -1), Open ); 
sellPrice = Min( ref( sar(), -1), Open );
buy = cross (high, sar());
sell = cross (sar(), low);

short = sell; 
cover = buy;
coverPrice = buyPrice; 
shortPrice = sellPrice;


Best regards,
Tomasz Janeczko


Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com

> 
> 
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > Hello Cliff,
> > 
> > First sorry for the delay in answering.
> > You don't get the buy on 5/22/01 because
> > it is the last bar in the data file and you reference
> > the previous bar SAR value in your formula:
> > 
> > buyPrice = ref (sar(), -1); sellPrice = ref( sar(), -1);
> > 
> > So the SAR is taken from the previous day and one
> > bar more is needed to trigger the signal.
> > 
> > But... very easy solution is to use:
> > buyPrice = sar(); sellPrice = sar();
> > 
> > buy = cross (high, buyPrice);
> > sell = cross (sellPrice , low);
> > 
> > without referencing one day back.
> > It will give you buy/sell signals exactly on that days
> > when SAR flips.
> > 
> > Best regards,
> > Tomasz Janeczko
> > ===============
> > AmiBroker - the comprehensive share manager.
> > http://www.amibroker.com
> > 
> > ----- Original Message ----- 
> > From: "Cliff Elion" <cliffelion@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Wednesday, May 23, 2001 8:10 AM
> > Subject: [amibroker] Need help with analysis/commentary
> > 
> > 
> > > Hi Tomasz,
> > > 
> > > I have a system based on Parabolic SAR. Most of the
> > > time it works OK but I have run into a problem maybe
> > > you can help me with.
> > > 
> > > Attached files:
> > > EXPE.AQH - quote data for expedia
> > > sar TEST 2.afl - my test analysis
> > > 
> > > If you run the analysis, you will see that the SAR 
> > > reversed position on 5/22/01 ... this is correct and 
> > > is based on the (high) price crossing the SAR of the
> > > previous day ... but you will also see that my
> > > analysis
> > > which uses: buyPrice = ref (sar(), -1); did not 
> > > generate a buy signal.
> > > 
> > > Can you help?
> > > 
> > > Cliff Elion
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Auctions - buy the things you want at great prices
> > > http://auctions.yahoo.com/
> > > 
> > > 
> > > Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> > > 
> > > 
> > 
> > 
> > --------------------------------------------------------------------
> ------------
> > 
> > 
> > > Date,Open,High,Low,Close,Volume
> > > 22-May-01,26.43,29.70,26.41,29.67,582200
> > > 21-May-01,27.02,27.05,25.42,26.60,501300
> > > 18-May-01,29.17,29.75,26,26.90,496800
> > > 17-May-01,28.94,30.20,28.43,29.15,410200
> > > 16-May-01,26.46,29.07,26.46,28.40,432200
> > > 15-May-01,27.20,27.61,26.85,27.28,301300
> > > 14-May-01,28.05,28.56,27,27.26,299700
> > > 11-May-01,28.92,28.97,27.71,28.07,197600
> > > 10-May-01,30.08,30.08,28.73,28.97,255600
> > > 9-May-01,28.40,30.40,28.36,30.24,502100
> > > 8-May-01,29.52,29.80,28.37,29.48,638800
> > > 7-May-01,30.77,31,29.50,29.50,576300
> > > 4-May-01,30.08,32.77,29.65,31,1051000
> > > 3-May-01,27.50,31.25,27.50,31.23,1138100
> > > 2-May-01,29.89,30.68,28.15,28.81,1949900
> > > 1-May-01,27.90,30.48,26.99,30.12,2399800
> > > 30-Apr-01,23.73,26.50,23.60,26.01,1142500
> > > 27-Apr-01,23.47,23.90,22.60,23.55,398900
> > > 26-Apr-01,21.32,22.55,21.10,22.50,290300
> > > 25-Apr-01,20.61,21.75,20.60,21.49,201600
> > > 24-Apr-01,21.72,22.25,20.90,20.91,276900
> > > 23-Apr-01,21.25,22,20.75,21.71,187300
> > > 20-Apr-01,21.14,21.75,20.90,21.61,272000
> > > 19-Apr-01,20.41,21.22,20.16,21.22,457300
> > > 18-Apr-01,19.95,20.93,19.70,20.68,918200
> > > 17-Apr-01,18.49,19.99,18.01,19.81,678000
> > > 16-Apr-01,18.27,19.30,17.65,18.60,761200
> > > 12-Apr-01,17.54,18.09,17.15,17.67,103300
> > > 11-Apr-01,17.12,18.49,17.01,18,204300
> > > 10-Apr-01,15.89,17.05,15.75,17.05,210200
> > > 9-Apr-01,14.85,16.10,14.80,15.61,165100
> > > 6-Apr-01,14.1562,15,13.8125,14.8125,161000
> > > 5-Apr-01,13.875,14.375,13.1875,14.125,115600
> > > 4-Apr-01,13.50,14,12.75,14,115300
> > > 3-Apr-01,13.375,13.5625,13.125,13.375,194000
> > > 2-Apr-01,13.25,13.875,12.1875,13.875,130400
> > > 30-Mar-01,11.6875,13.375,11.50,13.0625,234700
> > > 29-Mar-01,11.625,11.9375,11.50,11.625,8100
> > > 28-Mar-01,12.625,12.625,11.625,11.625,21400
> > > 27-Mar-01,12,12.6875,12,12.625,37400
> > > 26-Mar-01,12,12.50,11.8125,12.375,108400
> > > 23-Mar-01,11.875,12.375,11.875,11.9375,27700
> > > 22-Mar-01,12.25,12.25,11.25,12,104000
> > > 21-Mar-01,12.375,12.50,12.1875,12.3438,284900
> > > 20-Mar-01,12.625,12.75,12.1875,12.3125,212200
> > > 19-Mar-01,12,12.75,12,12.4375,92900
> > > 16-Mar-01,12.25,12.625,12.125,12.50,111000
> > > 15-Mar-01,12.75,12.9375,12,12.25,75200
> > > 14-Mar-01,12.6875,13.1875,12.50,12.5625,76500
> > > 13-Mar-01,12.6562,13.5625,12.6406,13,86400
> > > 12-Mar-01,12.5625,12.9375,12.375,12.7031,194200
> > > 9-Mar-01,13.125,13.4375,12.4375,12.75,92800
> > > 8-Mar-01,13.50,13.875,13.25,13.375,71000
> > > 7-Mar-01,13.6406,14,13.6406,13.75,125800
> > > 6-Mar-01,14.75,14.75,13.75,14,166300
> > > 5-Mar-01,13.125,14.625,13.125,14.625,828000
> > > 2-Mar-01,12.3125,13.625,11.875,13,340900
> > > 1-Mar-01,13.25,13.50,12,12.9375,447300
> > > 28-Feb-01,16.875,17.1875,14.125,15.625,207900
> > > 27-Feb-01,17.0156,17.3125,16.50,16.5625,83900
> > > 26-Feb-01,16,17.375,16,17,131900
> > > 23-Feb-01,15.50,16.375,14.4375,16.0625,121200
> > > 22-Feb-01,17.25,17.25,14.25,15.50,201000
> > > 21-Feb-01,17.25,17.75,16.50,16.50,189600
> > > 20-Feb-01,17,18.3125,16.9375,17.375,223400
> > > 16-Feb-01,16.8125,17.50,16.125,16.875,126300
> > > 15-Feb-01,16.625,17.0625,16.50,16.875,129500
> > > 14-Feb-01,16.1094,16.75,16,16.625,78300
> > > 13-Feb-01,16.9375,17,16,16.1875,135300
> > > 12-Feb-01,16.1875,17.125,16.1875,16.75,57200
> > > 9-Feb-01,16.8281,17,16.125,16.25,152000
> > > 8-Feb-01,15.7812,17.125,15.6875,16.9062,328600
> > > 7-Feb-01,16.0625,16.9375,15.75,15.75,96000
> > > 6-Feb-01,16.125,16.4375,16.0625,16.375,127600
> > > 5-Feb-01,15.6875,16.375,15.625,16.0625,138200
> > > 2-Feb-01,17.25,17.75,16.0625,16.5625,322400
> > > 1-Feb-01,17.75,17.875,16.75,17.3125,272400
> > > 31-Jan-01,17.375,18.1875,17.375,17.875,629000
> > > 30-Jan-01,18,18.50,17.1875,17.5625,890300
> > > 29-Jan-01,16.25,17.625,16.1875,16.75,312700
> > > 26-Jan-01,15.9062,16.375,15.875,16.25,100800
> > > 25-Jan-01,15.4375,16.75,15.25,16.4375,137500
> > > 24-Jan-01,15.7188,16.6875,15.6875,15.875,301900
> > > 23-Jan-01,15.0625,15.5625,15,15.375,133300
> > > 22-Jan-01,14.625,15,13.6875,14.8125,254600
> > > 19-Jan-01,14.6875,14.75,14,14.25,262800
> > > 18-Jan-01,12.25,14.125,12.125,14.0625,639500
> > > 17-Jan-01,11.3125,12.3125,10.9375,11.75,125800
> > > 16-Jan-01,11.0938,11.50,10.375,10.875,93700
> > > 12-Jan-01,10.8125,11,10.375,10.625,79300
> > > 11-Jan-01,9.50,10.75,9.50,10.5625,208700
> > > 10-Jan-01,9.9375,10.25,9.375,9.50,180600
> > > 9-Jan-01,9.625,9.875,9.50,9.875,91600
> > > 8-Jan-01,9.1875,9.6875,9.125,9.375,17900
> > > 5-Jan-01,9.75,10,9.125,9.25,51000
> > > 4-Jan-01,9.875,10,9.50,9.9062,135800
> > > 3-Jan-01,9.3125,9.9375,9.125,9.9375,127800
> > > 2-Jan-01,9.625,9.875,9.125,9.3125,66000
> > > 29-Dec-00,9.625,10.0625,9.25,9.5625,174000
> > > 28-Dec-00,9,10.25,8.75,9.75,116600
> > > 27-Dec-00,9.4375,9.5469,8.625,9.0625,73200
> > > 26-Dec-00,9.50,9.75,9.25,9.3125,66900
> > > 22-Dec-00,9.125,10.125,9,9.375,68200
> > > 21-Dec-00,11.125,11.25,9,9,114100
> > > 20-Dec-00,12.375,12.8125,10.875,11.125,151100
> > > 19-Dec-00,11.9375,13,11.9375,12.9375,73500
> > > 18-Dec-00,12.375,12.8125,11.9375,12.8125,41600
> > > 15-Dec-00,11.75,12.875,11.50,12.875,88800
> > > 14-Dec-00,12.9844,13.125,11.3125,11.9375,82200
> > > 13-Dec-00,12.5625,13.375,12.5625,12.5625,236600
> > > 12-Dec-00,12.5625,12.875,12.50,12.75,215000
> > > 11-Dec-00,12.75,13.1719,12.50,12.875,55400
> > > 8-Dec-00,12.1875,13.2344,12.125,13,125000
> > > 7-Dec-00,11.375,12.125,11.125,11.625,45500
> > > 6-Dec-00,12.50,12.6875,11.875,11.875,57500
> > > 5-Dec-00,12.3125,13.1875,12.3125,12.6875,88800
> > > 4-Dec-00,13,13.0156,12.0625,12.125,54000
> > > 1-Dec-00,13.625,14,13,13,63600
> > > 30-Nov-00,12.9531,14,12,13.8125,148800
> > > 29-Nov-00,13.8125,14.1875,13.375,13.4375,106200
> > > 28-Nov-00,14.25,14.4375,13.875,13.875,46200
> > > 27-Nov-00,14.4375,14.9375,13.75,14.4375,31300
> > > 24-Nov-00,13.625,14.3125,13.625,14,22100
> > > 22-Nov-00,13.6875,14,12.625,13.5625,115600
> > > 21-Nov-00,14.25,14.50,14,14.125,57500
> > > 20-Nov-00,15,15,14.4375,14.50,44400
> > > 17-Nov-00,15,15.1875,14.375,14.9375,108900
> > > 16-Nov-00,14.1562,15.125,13.875,15,73800
> > > 15-Nov-00,14.2188,15.375,13.8125,14,191900
> > > 14-Nov-00,14.25,15.125,14.25,14.75,140000
> > > 13-Nov-00,13.50,14.75,13.50,14.125,102500
> > > 10-Nov-00,14.125,15,13.9375,14.5625,170200
> > > 9-Nov-00,15,15.25,14.5625,15,172800
> > > 8-Nov-00,15.50,15.875,15.125,15.5625,177100
> > > 7-Nov-00,15.875,16.125,15.25,15.50,234200
> > > 6-Nov-00,16.75,16.8125,16,16.4375,226700
> > > 3-Nov-00,16.50,17,14.875,16,465900
> > > 2-Nov-00,13.75,16.25,13.375,15.875,418700
> > > 1-Nov-00,11.9375,13.75,11.875,13.375,418700
> > > 31-Oct-00,12.9375,13.875,12.125,12.8125,1318900
> > > 30-Oct-00,10.25,10.375,9,9.0625,521200
> > > 27-Oct-00,10.8438,10.875,9.875,10.1875,87500
> > > 26-Oct-00,11.125,11.25,10.25,10.875,189200
> > > 25-Oct-00,10.9062,11.3125,10.8125,11.1875,215300
> > > 24-Oct-00,10.75,11.25,10.6875,10.875,160600
> > > 23-Oct-00,9.9062,10.75,9.7031,10.625,175500
> > > 20-Oct-00,10.75,10.9375,9.8125,9.9375,154200
> > > 19-Oct-00,10.375,10.625,10.3125,10.5625,157300
> > > 18-Oct-00,10.25,10.625,9.625,9.6875,174700
> > > 17-Oct-00,10.5938,10.6875,10,10.6875,152800
> > > 16-Oct-00,10.0938,11,10.0625,10.5625,378500
> > > 13-Oct-00,8.50,8.875,7.75,8.875,166000
> > > 12-Oct-00,9.50,9.5156,8.5625,8.6875,100700
> > > 11-Oct-00,9,9.625,9,9.4375,85600
> > > 10-Oct-00,9.8125,10,9,9.5312,45300
> > > 9-Oct-00,9.125,9.875,8.9375,9.75,114700
> > > 6-Oct-00,9.3281,9.6875,9.125,9.50,57000
> > > 5-Oct-00,9.6875,9.75,9.25,9.3125,107300
> > > 4-Oct-00,10.375,10.5469,9.125,9.625,148100
> > > 3-Oct-00,12.4375,12.50,10.5625,10.5625,122500
> > > 2-Oct-00,12.875,13.125,12.25,12.4375,64200
> > > 29-Sep-00,14.1875,14.25,12.875,13,46800
> > > 28-Sep-00,14.75,14.75,14,14.125,60800
> > > 27-Sep-00,14.75,15.125,14.75,14.75,68600
> > > 26-Sep-00,15,15.25,14.9375,15,16500
> > > 25-Sep-00,15.5938,15.625,14.9375,14.9375,27600
> > > 22-Sep-00,15.875,15.875,15.125,15.4375,37200
> > > 21-Sep-00,16,16.0625,15.9375,16,38900
> > > 20-Sep-00,15.9375,16,15.875,15.875,36700
> > > 19-Sep-00,16,16.0625,15.875,16,41300
> > > 18-Sep-00,16.5625,16.5625,15.9375,15.9375,69300
> > > 15-Sep-00,16.25,17.125,16.0625,16.625,280300
> > > 14-Sep-00,16.625,16.625,16,16.125,116100
> > > 13-Sep-00,16.5625,16.625,16,16.375,139000
> > > 12-Sep-00,16.875,17,16.3125,16.50,26400
> > > 11-Sep-00,17.375,17.75,16.75,16.9375,98400
> > > 8-Sep-00,16.375,17.5625,15.75,17.375,281900
> > > 7-Sep-00,15.875,16.25,15.875,16.0625,102400
> > > 6-Sep-00,15.875,16.125,15.75,16,139200
> > > 5-Sep-00,15.8125,16.25,15.75,15.875,150600
> > > 1-Sep-00,16.0625,16.1875,15.625,15.8125,98900
> > > 31-Aug-00,16.0625,16.0625,16,16.0625,23200
> > > 30-Aug-00,15.9375,16.0625,15.875,16.0625,49900
> > > 29-Aug-00,16.0312,16.0625,15.875,16,20400
> > > 28-Aug-00,15.875,16.0625,15.875,16,37500
> > > 25-Aug-00,15.8125,15.9375,15.8125,15.875,25800
> > > 24-Aug-00,15.8125,16,15.6875,15.9375,29600
> > > 23-Aug-00,15.8125,15.875,15.8125,15.8125,10100
> > > 22-Aug-00,15.9375,16,15.75,15.8125,26300
> > > 21-Aug-00,15.9375,16.0625,15.875,15.9375,59500
> > > 18-Aug-00,15.875,16,15.875,15.875,22700
> > > 17-Aug-00,15.875,16.125,15.875,15.875,39600
> > > 16-Aug-00,15.75,16,15.5625,15.875,29900
> > > 15-Aug-00,15.50,15.8125,15.50,15.5625,64300
> > > 14-Aug-00,15.2812,15.9375,15.25,15.6875,143200
> > > 11-Aug-00,15.125,15.75,15,15.375,85100
> > > 10-Aug-00,16,16,14.75,15.25,124200
> > > 9-Aug-00,16.25,16.25,15.75,16.0625,76100
> > > 8-Aug-00,15.9375,16.25,15.5625,16.125,55800
> > > 7-Aug-00,16.0625,16.8125,15.75,15.9375,67900
> > > 4-Aug-00,15.75,17.125,15.75,16.625,50500
> > > 3-Aug-00,16.625,16.75,15.3125,15.875,95600
> > > 2-Aug-00,17.375,17.50,16.625,16.75,90400
> > > 1-Aug-00,18.0625,18.25,16.875,17.3125,181300
> > > 31-Jul-00,16.2812,17.25,16.0625,17.125,52500
> > > 28-Jul-00,16.75,17,16.0625,16.0625,44200
> > > 27-Jul-00,18.50,18.625,16.6875,16.9375,46700
> > > 26-Jul-00,18.6875,18.9375,17.9375,18.875,41000
> > > 25-Jul-00,18.8125,19,18.625,18.75,27400
> > > 24-Jul-00,18.75,19.125,18.625,18.875,25000
> > > 21-Jul-00,18.875,19.375,18.6875,18.6875,23500
> > > 20-Jul-00,19.9375,19.9375,18.9375,19,68300
> > > 19-Jul-00,20.1875,20.1875,19.375,19.625,119500
> > > 18-Jul-00,20.375,20.4688,19.625,19.875,47700
> > > 17-Jul-00,20.125,21,20,20.25,66600
> > > 14-Jul-00,20.3438,21,20,21,82400
> > > 13-Jul-00,19.375,20.50,19.375,20.50,104300
> > > 12-Jul-00,19.50,20,19.375,19.9375,66900
> > > 11-Jul-00,19.0625,20,19.0625,19.6875,41400
> > > 10-Jul-00,19,19.50,18.50,19.4375,33900
> > > 7-Jul-00,19.875,19.875,18,18.6875,115800
> > > 6-Jul-00,18.125,19.9375,18.125,19.8125,121800
> > > 5-Jul-00,16.8125,19.625,16.8125,18.625,172600
> > > 3-Jul-00,15.875,17.875,15.8438,17.25,122600
> > > 30-Jun-00,19,20.4375,14.6875,14.8125,527600
> > > 29-Jun-00,17.0625,18.9375,17,18.75,126000
> > > 28-Jun-00,16.3125,18,15.75,17,193000
> > > 27-Jun-00,17.25,17.25,15.625,15.625,142000
> > > 26-Jun-00,15.625,15.6875,14.9375,15.25,182900
> > > 23-Jun-00,16.6875,16.6875,15.50,15.6875,49500
> > > 22-Jun-00,17.5625,17.75,16.50,16.50,99100
> > > 21-Jun-00,17.75,18.0625,17.625,17.625,35300
> > > 20-Jun-00,17.7188,18.5625,17.5625,18.0625,37900
> > > 19-Jun-00,18.75,19,17.6875,18.25,101900
> > > 16-Jun-00,18.50,20,18.50,18.50,18000
> > > 15-Jun-00,18.375,19,18.125,19,23200
> > > 14-Jun-00,20.3438,20.375,18.50,18.75,45000
> > > 13-Jun-00,19.75,20.375,19.1875,20.125,45500
> > > 12-Jun-00,20,20.75,19.50,19.75,65500
> > > 9-Jun-00,20.9375,21,19.9375,20,44900
> > > 8-Jun-00,22.25,22.875,20.75,20.875,77400
> > > 7-Jun-00,20,21.50,19.75,21.50,84500
> > > 6-Jun-00,19.50,20.75,18.75,19.75,95100
> > > 5-Jun-00,20.1562,21.50,19.50,21.4375,66500
> > > 2-Jun-00,19.50,20,19.50,19.5625,52400
> > > 1-Jun-00,18.625,19.50,18.375,19,27300
> > > 31-May-00,18.875,19.0625,18.25,18.375,13600
> > > 30-May-00,18,19,17.625,19,67100
> > > 26-May-00,17.375,17.75,17.3125,17.625,44000
> > > 25-May-00,17.375,17.75,17,17.4375,76900
> > > 24-May-00,17.5625,18,16.8125,17.50,121500
> > > 23-May-00,17.50,18.375,17.0625,17.50,44300
> > > 22-May-00,18.50,19,16.8125,17.75,94100
> > > 19-May-00,19.25,19.625,18.25,18.50,56200
> > > 18-May-00,20.125,20.375,19.25,19.625,88200
> > > 17-May-00,19,20,19,19.75,33700
> > > 16-May-00,20.25,20.25,18.6875,19.50,95500
> > > 15-May-00,19.0625,20.125,18.75,20.125,45400
> > > 12-May-00,18.5625,20.50,18.375,19.25,120200
> > > 11-May-00,19.0625,19.0625,18.375,18.4375,41600
> > > 10-May-00,19.50,19.625,18.25,18.25,89900
> > > 9-May-00,19.2812,19.6875,18.875,19.6875,180600
> > > 8-May-00,17.50,19.50,17.50,19.3125,275000
> > > 5-May-00,18.375,18.6875,16.875,18,122800
> > > 4-May-00,19.25,19.9375,18.50,18.625,129400
> > > 3-May-00,20.3125,20.625,19.3125,19.8125,149300
> > > 2-May-00,19.75,23,19.75,20.8125,935500
> > > 1-May-00,15.50,19.6875,15.4688,19.50,789600
> > > 28-Apr-00,14.3438,15.25,14.3125,15.0625,80900
> > > 27-Apr-00,14.0625,14.125,13.875,14,116800
> > > 26-Apr-00,15.375,15.375,14.25,14.25,41000
> > > 25-Apr-00,14.75,16.25,14.50,14.625,115200
> > > 24-Apr-00,16.625,17.50,13,14.4375,119200
> > > 20-Apr-00,16.625,18,16.625,16.75,69900
> > > 19-Apr-00,15.375,18.875,14.875,16.75,109800
> > > 18-Apr-00,14.0625,15.375,14,14.625,138600
> > > 17-Apr-00,16.1562,18.5625,13.875,14,191200
> > > 14-Apr-00,17,17.125,14.50,15.4375,189200
> > > 13-Apr-00,16.50,20,16.50,17.875,210300
> > > 12-Apr-00,18.0625,18.375,15.6875,16.0625,137100
> > > 11-Apr-00,20.0625,20.375,18,18,91700
> > > 10-Apr-00,21.25,21.75,20.125,20.375,51500
> > > 7-Apr-00,20.6875,21.75,20.50,21.75,57300
> > > 6-Apr-00,21,21.3125,20.375,21,59300
> > > 5-Apr-00,20.75,21.75,19.9375,20.9375,117500
> > > 4-Apr-00,22.50,22.625,20.625,21.75,98100
> > > 3-Apr-00,21.25,22.625,21.25,21.75,95700
> > > 31-Mar-00,24.50,24.75,21.0781,21.25,156700
> > > 30-Mar-00,24.3125,25.125,23.50,24.25,102400
> > > 29-Mar-00,25.625,25.9375,23.75,24.9375,50400
> > > 28-Mar-00,26.75,27.25,26.125,26.1875,29500
> > > 27-Mar-00,27.1875,28.125,26.75,27.375,29500
> > > 24-Mar-00,29.3125,29.50,26.875,27.125,78700
> > > 23-Mar-00,24.6562,29.8125,24.50,28.875,267400
> > > 22-Mar-00,24.2188,25,24,24.50,153300
> > > 21-Mar-00,23.50,24.25,23,24,98400
> > > 20-Mar-00,24.125,25,22.50,23.625,89400
> > > 17-Mar-00,26.25,26.50,22,24.625,482300
> > > 16-Mar-00,27.6875,28.5625,25.50,26.25,89100
> > > 15-Mar-00,28.50,30.125,26,26.6875,139700
> > > 14-Mar-00,29.8438,31,28.50,28.50,129800
> > > 13-Mar-00,32.75,32.75,29.50,29.50,253800
> > > 10-Mar-00,35.1562,35.875,29.50,34.8125,243700
> > > 9-Mar-00,35.375,36.375,34,34.875,146500
> > > 8-Mar-00,37.125,38,32.375,33.25,306300
> > > 7-Mar-00,31.50,36,30.75,34.5625,418100
> > > 6-Mar-00,26.3125,30.375,26.3125,29.875,499700
> > > 3-Mar-00,21,27.25,20.75,26,704200
> > > 2-Mar-00,19.375,20,19,19.375,213500
> > > 1-Mar-00,20.50,21.875,18.875,19,315200
> > > 29-Feb-00,21.5625,22,19.50,20,301700
> > > 28-Feb-00,23.3125,23.3125,21,21.50,340500
> > > 25-Feb-00,24.50,25,21.875,22.1875,139800
> > > 24-Feb-00,25.0625,25.125,24,24.4375,67200
> > > 23-Feb-00,26.375,26.50,23.75,24.75,87400
> > > 22-Feb-00,27.6875,27.8125,25.625,26.25,81100
> > > 18-Feb-00,29.25,29.50,27.4375,28.50,62600
> > > 17-Feb-00,29.50,30,29.25,29.25,64400
> > > 16-Feb-00,28.25,30,28.25,29.50,62300
> > > 15-Feb-00,27.125,28.375,27.125,28,91900
> > > 14-Feb-00,28,29,27.125,27.3125,82700
> > > 11-Feb-00,28.50,29,26.5625,27.375,155000
> > > 10-Feb-00,29.75,29.75,28.375,28.75,57700
> > > 9-Feb-00,31.125,31.375,29.125,29.8125,87100
> > > 8-Feb-00,32.0625,32.50,31,31,74700
> > > 7-Feb-00,33.875,33.875,32.0625,33,41400
> > > 4-Feb-00,35.125,35.50,32.50,33.875,102800
> > > 3-Feb-00,36.50,36.50,35.25,35.3125,195600
> > > 2-Feb-00,34.25,36.1875,33,35.25,303500
> > > 1-Feb-00,31.50,37,31.50,32.75,712400
> > > 31-Jan-00,28.9375,29.125,24.75,27.25,269300
> > > 28-Jan-00,31,31.375,28.50,29,96300
> > > 27-Jan-00,32.50,32.75,31,31,73400
> > > 26-Jan-00,33.25,33.25,31.50,32.9375,57000
> > > 25-Jan-00,32.125,33.375,31.875,33,113400
> > > 24-Jan-00,34.7812,34.8125,32,32.625,121300
> > > 21-Jan-00,34.50,35.625,34.50,35,50500
> > > 20-Jan-00,36.375,36.375,34.25,34.6875,87700
> > > 19-Jan-00,35,36.375,34.875,35.75,228800
> > > 18-Jan-00,35,35.75,34.125,35.25,184900
> > > 14-Jan-00,35.625,36,33.875,34.125,227100
> > > 13-Jan-00,37.75,37.875,35.0625,35.75,142600
> > > 12-Jan-00,35.875,38.50,35,37.25,255500
> > > 11-Jan-00,36.625,36.75,34.375,35.375,178900
> > > 10-Jan-00,38.25,38.875,37,37,164200
> > > 7-Jan-00,37.125,38,37,37.875,38700
> > > 5-Jan-00,36.25,39.25,34.50,38.375,235900
> > > 4-Jan-00,35.375,39,34.50,36,163200
> > > 3-Jan-00,35.50,39.9375,34.50,35.375,150700
> > > 31-Dec-99,37.375,37.50,34.75,35,242800
> > > 30-Dec-99,39.875,40.1875,36.50,37.1875,221100
> > > 29-Dec-99,40.625,41,39.875,40,224500
> > > 28-Dec-99,41.0312,41.25,40.50,40.9375,190600
> > > 27-Dec-99,41.5625,41.875,40.875,41.875,163500
> > > 23-Dec-99,41.75,42.75,41.375,41.9375,179800
> > > 22-Dec-99,42.375,42.6875,40.50,42.6875,161400
> > > 21-Dec-99,39.9375,42.875,39.375,41.8438,344600
> > > 20-Dec-99,41.4375,41.9375,39.125,39.125,510100
> > > 17-Dec-99,44.1875,44.25,41.4375,41.50,344400
> > > 16-Dec-99,43.0938,45,43,43.1875,220000
> > > 14-Dec-99,46.2812,47.875,45.25,45.50,282100
> > > 13-Dec-99,48.50,48.50,45.125,46.375,268100
> > > 10-Dec-99,50.50,51.875,47.3125,50,246100
> > > 9-Dec-99,50.125,52.0625,48,50.50,280200
> > > 8-Dec-99,46.25,51.50,46.25,51,276400
> > > 7-Dec-99,49.75,50.125,45.375,46.875,429300
> > > 6-Dec-99,55,55.125,48.75,48.75,653300
> > > 3-Dec-99,51.9375,55.75,50.4375,54.9375,547800
> > > 2-Dec-99,52.4375,53,50.125,51.5625,157200
> > > 1-Dec-99,53.5625,54.4375,49.9375,52.0625,335800
> > > 30-Nov-99,49,55.125,48.9375,53.25,1176600
> > > 29-Nov-99,47.4375,49.625,44,48.1875,607200
> > > 26-Nov-99,40.875,46.875,40.8125,46.125,392900
> > > 24-Nov-99,40.3125,42.8125,40,41,448900
> > > 23-Nov-99,43.50,44,40.25,40.8125,476200
> > > 22-Nov-99,45.75,45.75,42.25,43.3125,284800
> > > 19-Nov-99,42.375,46.625,42.375,44.3125,516700
> > > 
> > 
> > 
> > --------------------------------------------------------------------
> ------------
> > 
> > 
> > > /* SAR with short/long/stops + commentary*/
> > > 
> > > buyPrice = ref (sar(), -1); sellPrice = ref( sar(), -1);
> > > //buyPrice = sar(); sellPrice = sar();
> > > buy = cross (high, buyPrice);
> > > sell = cross (sellPrice , low);
> > > 
> > > short = sell; 
> > > cover = buy;
> > > coverPrice = buyPrice; 
> > > shortPrice = sellPrice;
> > > 
> > > buy = ExRem( buy, sell );
> > > sell = ExRem( sell, buy );
> > > short = ExRem( short, cover );
> > > cover = ExRem( cover, short );
> > > 
> > > /******************Wilderish CSI*********************/
> > > ADXR = (adx() + ref(adx(), -14))/2;
> > > CSI = ADXR * ATR(14);
> > > /******************COMMENTARY*****************/
> > > /* Calculate stop for commentary */
> > > bsbuy = barssince( buy );
> > > bssell = barssince( sell );
> > > position = (bsbuy < bssell);
> > > longStop = 0.92 * valuewhen(buy,buyPrice);
> > > shortStop = 1.08* valuewhen(sell,sellPrice);
> > > actualStop = iif (position, max( sar(), longStop), min ( sar(), 
> shortStop));
> > > fullname()+ "(**" + name() + "**)" + " as of " + date();
> > > 
> > > "\nCurrent Statistics\n";
> > > "Close H/L: " + WriteVal(Close) + WriteVal(high) + WriteVal ( 
> Low);
> > > "Change: " + WriteVal(Close - Ref( Close, -1 ) ) ;
> > > "CSI/ADXR: " + WriteVal(CSI) + " /" + WriteVal(ADXR);
> > > "\nPosition: " + writeif( position, "Long", "Short");
> > > "prev SAR: " + WriteVal(ref(SAR(),-1));
> > > "new SAR: " + WriteVal(SAR());
> > > "Stop: " + writeif (position, writeval (longStop), 
> writeval(shortStop));
> > > 
> > > "\nTomorrows action - "+
> > > writeif (position, "sell ", "buy ") + "stop @" + writeVal 
> (actualStop);
> > > 
> > > "\nRecent signals - "+
> > > writeif( bsbuy > 5 AND bssell > 5, "no signals during last 5 
> periods.",
> > > writeif( bsbuy < bssell, "buy signal " + writeval( bsbuy, 3.0 ),
> > > "sell signal " + writeval( bssell, 3.0) ) + " periods ago.");
> > > 
> > > "\ntest SAR(-2/-1/0) " 
> > > + writeval (ref (sar(),-2))
> > > + writeval (ref (sar(),-1))
> > > + writeval ( sar() );
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>