Home
Make your own free website on Tripod.com

WesternBlueSkyMining

Some May Say....I have few friends that are prepared to knock me down...And Help Me out...
I say Thanks for the Star Earthing Point...

Physics Forums    Yahoo.com    Tripod.com




REM Seeing some people have a copy, can someone
REM fill in the blanks and send your comments to
REM Smokingwheels@yahoo.com AND WesternBlueSkyMining@yahoo.com   REM Copy INPUT AND OUTPUT
REM Permission to Copy and Paste and Play to anybody you like
REM Oh there is a few things missing From this program
REM Like Options and Addons and rules.....Some things may not work but I do not have the time to fix...
REM Put a ' to prefix any errors when you first run this program
REM Should work in most BASIC Languages....LOL...
'SCREEN 12
CLEAR 0, 0, 8000
RANDOMIZE TIMER
DEFDBL A-Z
CLS
tim = 5
TIMER ON
REM sound added thru client.bas with Winamp and Shoutcast 1.9x
REM need sound AC/DC Rules UNTIL I heard Jessica Mauboy
REM maybe this one push safety margin for profit. The Program....
mx = 10000: bank = 1000: equity = 1000
REM takes 40 min + to fill calculations
GOSUB loaddata
dat = 1
REM output for testing append for realtime data
CLOSE #1: CLOSE #2: CLOSE #3: CLOSE #4
OPEN "c:\qb\stock\yahoo\profit.csv" FOR APPEND AS #4
OPEN "c:\qb\stock\yahoo\tgraph.csv" FOR APPEND AS #3
OPEN "c:\qb\stock\yahoo\taudusd.csv" FOR APPEND AS #2
SHELL "cd c:\qb\url2file"

'OPEN "c:\qb\stock\yahoo\hist\profit.csv" FOR OUTPUT AS #4
'OPEN "c:\qb\stock\yahoo\hist\tgraph.csv" FOR OUTPUT AS #3
'OPEN "c:\qb\stock\yahoo\hist\taudusd.csv" FOR OUTPUT AS #2
'OPEN "c:\qb\stock\yahoo\hist\haudusd.csv" FOR INPUT AS #1



GOSUB tick

DO
REM WHILE NOT EOF(1)


DO
starttime = TIMER + (tim + RND(5.12345679#))
IF INKEY$ = CHR$(27) THEN GOTO shutdown

DO
IF INKEY$ = CHR$(27) THEN GOTO shutdown

eltime = TIMER
'EXIT DO
IF starttime > 86399 THEN starttime = starttime - 86399

IF eltime > starttime THEN
CLOSE #6
OPEN "c:\qb\url2file\client.txt" FOR OUTPUT AS #6
CLOSE #6
EXIT DO
END IF
LOCATE 1, 1
'PRINT eltime, starttime, TIMER
LOOP
GOSUB tick
LOOP

LOOP
END

tick:
PRINT TIMER
CLOSE #1
SHELL "c:\qb\url2file\audusd.bat"
OPEN "c:\qb\url2file\audusd.csv" FOR INPUT AS #1
'OPEN "c:\qb\stock\yahoo\taudusd.csv" FOR INPUT AS #1
'SHELL "c:\qb\url2file\audusd.bat"
IF LOF(1) = 0 THEN
IF INKEY$ = CHR$(27) THEN GOTO shutdown
CLS
PRINT "No Internet Connection"
SOUND 2500, 20
GOTO tick
END IF
'INPUT #1, yahoocode$, what$, sell$, sdate$, stime$
'WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
CLOSE #1

GOTO realtime
'GOTO full
sixth:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
ELSE RETURN
END IF

fifth:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
ELSE RETURN
END IF
quarter:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
ELSE RETURN
END IF

third:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$

ELSE RETURN
END IF

half:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
ELSE RETURN
END IF

full:
IF NOT EOF(1) THEN
INPUT #1, yahoocode$, sell$, sdate$, stime$
WRITE #2, yahoocode$, what$, sell$, sdate$, stime$, TIME$, DATE$
ELSE RETURN
END IF
realtime:
CLOSE #1
SHELL "c:\qb\url2file\audusd.bat"
OPEN "c:\qb\url2file\audusd.csv" FOR INPUT AS #1
IF LOF(1) = 0 OR LOF(1) = 3252 OR LOF(1) = 4282 THEN GOTO tick
INPUT #1, yahoocode$, what$, sell$, sdate$, stime$
WRITE #2, yahoocode$, sell$, sdate$, stime$, TIME$, DATE$
REM remove or add
CLOSE #1
SOUND 100, 5
populate:
sell = VAL(sell$)
IF sell = 0 THEN GOTO realtime
REM check maths
'sell = 1
REM sell stack
REM s stack
s40 = s39: s39 = s38: s38 = s37: s37 = s36: s36 = s35
s35 = s34: s34 = s33: s33 = s32: s32 = s31: s31 = s30
s30 = s29: s29 = s28: s28 = s27: s27 = s26: s26 = s25
s25 = s24: s24 = s23: s23 = s22: s22 = s21: s21 = s20
s20 = s19: s19 = s18: s18 = s17: s17 = s16: s16 = s15
s15 = s14: s14 = s13: s13 = s12: s12 = s11: s11 = s10: s10 = s9: s9 = s8
s8 = s7: s7 = s6: s6 = s5: s5 = s4: s4 = s3: s3 = s2: s2 = s1: s1 = sell
REM t stack
t20 = t19: t19 = t18: t18 = t17: t17 = t16: t16 = t15
t15 = t14: t14 = t13: t13 = t12: t12 = t11: t11 = t10: t10 = t9: t9 = t8
t8 = t7: t7 = t6: t6 = t5: t5 = t4: t4 = t3: t3 = t2: t2 = t1: t1 = sell
REM u stack
u10 = u9: u9 = u8: u8 = u7: u7 = u6: u6 = u5: u5 = u4: u4 = u3: u3 = u2: u2 = u1: u1 = sell
REM v stack
v6 = v5: v5 = v4: v4 = v3: v3 = v2: v2 = v1: v1 = sell
REM ave stack
REM ave s
sa20 = sa19: sa19 = sa18: sa18 = sa17: sa17 = sa16: sa16 = sa15
sa15 = sa14: sa14 = sa13: sa13 = sa12: sa12 = sa11: sa11 = sa10
sa10 = sa9: sa9 = sa8: sa8 = sa7: sa7 = sa6: sa6 = sa5
sa5 = sa4: sa4 = sa3: sa3 = sa2: sa2 = sa1
sa1 = ((s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + s15 + s16 + s17 + s18 + s19 + s20 + s21 + s22 + s23 + s24 + s25 + s26 + s27 + s28 + s29 + s30 + s31 + s32 + s33 + s34 + s35 + s36 + s37 + s38 + s39 + s40) * .025) -  _
.00000001490116#
REM ave t
ta10 = ta9: ta9 = ta8: ta8 = ta7: ta7 = ta6: ta6 = ta5
ta5 = ta4: ta4 = ta3: ta3 = ta2: ta2 = ta1
ta1 = ((t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + t11 + t12 + t13 + t14 + t15 + t16 + t17 + t18 + t19 + t20) * .05) - .00000001490116#
REM u ave stack
ua5 = ua4: ua4 = ua3: ua3 = ua2: ua2 = ua1
ua1 = ((u1 + u2 + u3 + u4 + u5 + u6 + u7 + u8 + u9 + u10) * .1) - .00000001490116#
REM v ave stack
va3 = va2: va2 = va1
va1 = (((v1 + v2 + v3 + v4 + v5 + v6) * .166666666666667#))
REM saf calc
saf = ((s1 + ((s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + s15 + s16 + s17 + s18 + s19 + s20) * .05) + ((sa1 + sa2 + sa3 + sa4 + sa5 + sa6 + sa7 + sa8 + sa9 + sa10) * .05) * .5) * .444444440765401#) - .000000000000574#
REM taf calc
taf = ((t1 + ((t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10) * .1) + ((ta1 + ta2 + ta3 + ta4 + ta5 + ta6 + ta7 + ta8 + ta9 + ta10) * .1) * .5) * .3999999964237239#) - .000000000000006#
REM uaf calc
uaf = ((u1 + ((u1 + u2 + u3 + u4 + u5) * .2) + ((ua1 + ua2 + ua3 + ua4 + ua5) * .2) * .5) * .3999999964237239#) - .000000000000006#
REM vaf calc
vaf = ((v1 + ((v1 + v2 + v3) * .3333333333333#) + ((va1 + va2 + va3) * .3333333333333#) * .5) * .3999999999999999#) + .0000000000000604#
a = a + 1
IF a > 20 THEN
ga = (1 / ((1 / s1) + (1 / s2) + (1 / s3) + (1 / s4) + (1 / s5) + (1 / s6) + (1 / s7) + (1 / s8) + (1 / s9) + (1 / s10) + (1 / s11) + (1 / s12) + (1 / s13) + (1 / s14) + (1 / s15) + (1 / s16) + (1 / s17) + (1 / s18) + (1 / s19) + (1 / s20))) * 20
END IF
IF a > 9 THEN
ha = (1 / ((1 / t1) + (1 / t2) + (1 / t3) + (1 / t4) + (1 / t5) + (1 / t6) + (1 / t7) + (1 / t8) + (1 / t9) + (1 / t10))) * 10
END IF
IF a > 4 THEN
ia = (1 / ((1 / u1) + (1 / u2) + (1 / u3) + (1 / u4) + (1 / u5))) * 5
END IF
IF a > 2 THEN
ja = (1 / ((1 / v1) + (1 / v2) + (1 / v3))) * 3
END IF


REM taf stack
taf20 = taf19: taf19 = taf18: taf18 = taf17: taf17 = taf16: taf16 = taf15
taf15 = taf14: taf14 = taf13: taf13 = taf12: taf12 = taf11: taf11 = taf10
taf10 = taf9: taf9 = taf8: taf8 = taf7: taf7 = taf6: taf6 = taf5
taf5 = taf4: taf4 = taf3: taf3 = taf2: taf2 = taf1
taf1 = (taf - ga) * mx
REM ave taf-ga
tafa20 = (taf1 + taf2 + taf3 + taf4 + taf5 + taf6 + taf7 + taf8 + taf9 + taf10 + taf11 + taf12 + taf13 + taf14 + taf15 + taf16 + taf17 + taf18 + taf19 + taf20) * .05
tafa10 = (taf1 + taf2 + taf3 + taf4 + taf5 + taf6 + taf7 + taf8 + taf9 + taf10) * .1
tafa5 = (taf1 + taf2 + taf3 + taf4 + taf5) * .2
index = index + 1
IF index < 50 AND dat = 0 THEN

TIMER OFF
GOTO populate
ELSE TIMER ON
END IF
GOSUB savedata

'WRITE #3, index, sell, ta1, taf, ha, ga, index, (sell - ta1) * mx, (sell - ha) * mx, ((ha - ta1) * (mx * 2.5)), (taf - ga) * mx, tafa5, tafa10 * 2.5, tafa20 * 2.5, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx)
ssa1 = (sell - sa1) * mx: sta1 = (sell - ta1) * mx: sua1 = (sell - ua1) * mx: sva1 = (sell - va1) * mx
sha = (sell - ha) * mx: sia = (sell - ia) * mx: sja = (sell - ja) * mx
gasa1 = ((ga - sa1) * (mx * 2.5))
hata1 = ((ha - ta1) * (mx * 2.5))
iaua1 = ((ia - ua1) * (mx * 2.5))
java1 = ((ja - va1) * (mx * 2.5))
tafwa = (taf - ga) * mx: uafwai = (uaf - ha) * mx: vafwaj = (vaf - ia) * mx
eltim2 = eltim1
eltim1 = TIMER
IF ssa1 > 1.5 THEN trend = trend + 1
IF ssa1 < -1.5 THEN trend = trend - 1
IF trend > 0 THEN trend = trend - .04
IF trend < 0 THEN trend = trend + .04
WRITE #3, eltim1 - eltim2, index, sell, ssa1, sta1, sua1, sva1, sha, sia, sja, gasa1, hata1, iaua1, java1, tafwa, uafwai, vafwaj, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx), (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1 _
) * mx) + ((sell - sa1) * mx)) * .25, ssa1 + sta1 + sua1 + sva1 + ssa + sha + sia + sja + gasa1 + hata1 + iaua1 + java1 + tafwa + uafwai + vafwaj, DATE$, TIME$, profit

LOCATE 1, 1
PRINT USING "##.#####  "; sell; sa1; saf; ga; ga
PRINT USING "##.#####  "; sell; ta1; taf; ha; ga
PRINT USING "##.#####  "; sell; ua1; uaf; ia; ga
PRINT USING "##.#####  "; sell; va1; vaf; ja; ga
PRINT
PRINT USING "####.####"; (sell - sa1) * mx; (sell - ga) * mx; (sa1 - ga) * mx; (ga - ga) * mx; (saf - ga) * mx; tafa20
PRINT USING "####.####"; (sell - ta1) * mx; (sell - ha) * mx; (ta1 - ha) * mx; (ha - ga) * mx; (taf - ga) * mx; tafa10
PRINT USING "####.####"; (sell - ua1) * mx; (sell - ia) * mx; (ua1 - ia) * mx; (ia - ga) * mx; (uaf - ga) * mx; tafa5
PRINT USING "####.####"; (sell - va1) * mx; (sell - ja) * mx; (va1 - ja) * mx; (ia - ga) * mx; (vaf - ga) * mx
PRINT USING "####.####"; (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1) * mx) + ((sell - sa1) * mx)) * .25

PRINT USING "####.## "; index; ((sell - ua1) * mx) + ((ua1 - ia) * mx); tim
PRINT USING "####.## "; index; ((sell - ta1) * mx) + ((ta1 - ha) * mx)
PRINT USING "####.## "; index; ((sell - va1) * mx) + ((va1 - ja) * mx)
PRINT
'PRINT saf, taf, uaf, vaf, sa1, ta1, ua1, va1

REM timer increase
'tim = tim + RND(.0411111) + .05

IF (sell - sa1) * mx > 1.5 THEN
PRINT "sal 2"
tim = tim - 50
END IF
IF (sell - sa1) * mx < -1.5 THEN
PRINT "sal -2"
tim = tim - 50
END IF


IF tim > 35 THEN tim = 35
IF tim < 35 THEN tim = 35

IF trend < -88.5 THEN
SOUND 1500, 1
GOTO skipbuy
END IF

REM buy normal
IF ssa1 > -20 AND sell < s40 + .0012 AND sta1 < 0 AND sua1 < 0 AND sva1 < 0 AND sha < 0 AND sia < 0 AND sja < 0 AND hata1 < 0 AND hata1 > sta1 AND gasa1 < ssa1 THEN
REM no trade but slow market sell + .0005 < s36 AND
WRITE #3, "0", index, sell, ssa1, sta1, sua1, sva1, sha, sia, sja, gasa1, hata1, iaua1, java1, tafwa, uafwai, vafwaj, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx), (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1) * mx) + (( _
sell - sa1) * mx)) * .25, ssa1 + sta1 + sua1 + sva1 + ssa + sha + sia + sja + gasa1 + hata1 + iaua1 + java1 + tafwa + uafwai + vafwaj, DATE$, TIME$, profit
bank = bank - (10000 * sell)
profit = profit - (10000 * sell)
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "buy old", trend
CLOSE #6
OPEN "c:\qb\url2file\client.txt" FOR OUTPUT AS #6
WRITE #6, "BUY"
CLOSE #6
buy = buy + 1
SOUND 900, 15
SOUND 800, 15
'SOUND 900, 1
'SOUND 800, 1
'SHELL "c:\qb\stock\yahoo\sounds\winbuy.bat"
END IF

REM buy new quite days             AND ssa1 < 0                                     
IF ssa1 > -20 AND sell < s40 + .0004 AND sta1 < 0 AND sua1 < 0 AND sva1 < 0 AND sha < 0 AND sia < 0 AND sja < 0 AND hata1 > 0 AND iaua1 > 0 AND java1 < 0 AND java1 < 0 AND java1 < 0 AND tafwa < 0 AND uafwai < 0 AND vafwaj < 0 THEN
REM no trade but slow market sell + .0005 < s36 AND
WRITE #3, "0", index, sell, ssa1, sta1, sua1, sva1, sha, sia, sja, gasa1, hata1, iaua1, java1, tafwa, uafwai, vafwaj, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx), (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1) * mx) + (( _
sell - sa1) * mx)) * .25, ssa1 + sta1 + sua1 + sva1 + ssa + sha + sia + sja + gasa1 + hata1 + iaua1 + java1 + tafwa + uafwai + vafwaj, DATE$, TIME$, profit
bank = bank - (10000 * sell)
profit = profit - (10000 * sell)
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "buy old", trend
buy = buy + 1
OPEN "c:\qb\url2file\client.txt" FOR OUTPUT AS #6
WRITE #6, "BUY"
CLOSE #6
SOUND 600, 15
SOUND 500, 15
'SOUND 600, 1
'SOUND 500, 1
END IF

skipbuy:

REM normal days sell
IF sell > s40 + .0008 AND sta1 > -.6 AND sua1 > -.6 AND sva1 > .6 AND sha > .6 AND sia > .6 AND sja > -.6 AND hata1 > -.6 THEN
FOR i = 1 TO 1
WRITE #3, "1", index, sell, ssa1, sta1, sua1, sva1, sha, sia, sja, gasa1, hata1, iaua1, java1, tafwa, uafwai, vafwaj, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx), (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1) * mx) + (( _
sell - sa1) * mx)) * .25, ssa1 + sta1 + sua1 + sva1 + ssa + sha + sia + sja + gasa1 + hata1 + iaua1 + java1 + tafwa + uafwai + vafwaj, DATE$, TIME$, profit
NEXT
IF buy > 0 THEN
profit = equity + ((10000 * (sell * buy)) + profit)
buy = 0: bank = profit: profit = 0
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "sell old", trend
PRINT "  "; bank, sell
END IF
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "sell old", trend
trend = -41
OPEN "c:\qb\url2file\client.txt" FOR OUTPUT AS #6
WRITE #6, "SELL"
CLOSE #6

SOUND 1000, 15
'SOUND 1000, 1
END IF

REM quite days sell
IF sell > s40 + .0012 AND ssa1 > -.5 AND sta1 > -.5 AND sua1 > -.5 AND sva1 > -.5 AND sha > -.5 AND sia > .5 AND sja > -.5 AND gasa1 > -.5 AND hata1 > -.5 AND iaua1 > -.5 AND java1 > -.5 AND tafwa > -.5 AND uafwai > -.5 AND vafwaj > -.5 AND gasa1 >  _
ssa1 THEN
WRITE #3, "1", index, sell, ssa1, sta1, sua1, sva1, sha, sia, sja, gasa1, hata1, iaua1, java1, tafwa, uafwai, vafwaj, ((sell - ta1) * mx) + ((sell - ha) * mx) + ((ha - ta1) * mx), (((sell - sa1) * mx) + ((sell - ta1) * mx) + ((sell - ua1) * mx) + (( _
sell - sa1) * mx)) * .25, ssa1 + sta1 + sua1 + sva1 + ssa + sha + sia + sja + gasa1 + hata1 + iaua1 + java1 + tafwa + uafwai + vafwaj, DATE$, TIME$, profit
IF buy > 0 THEN
profit = equity + ((10000 * (sell * buy)) + profit)
buy = 0: bank = profit: profit = 0
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "sell old", trend
PRINT "  "; bank, sell
END IF
WRITE #4, DATE$, TIME$, bank, equity, profit, sell, buy, "sell old", trend
trend = -41
OPEN "c:\qb\url2file\client.txt" FOR APPEND AS #6
WRITE #6, "SELL"
CLOSE #6

SOUND 1200, 15
'SOUND 1200, 1
END IF
RETURN

savedata:
OPEN "c:\qb\stock\yahoo\auusdata.csv" FOR OUTPUT AS #5
REM raw data
WRITE #5, s40, s39, s38, s37, s36, s35, s34, s33, s32, s31, s30, s29, s28, s27, s26, s25, s24, s23, s22, s21, s20, s19, s18, s17, s16, s15, s14, s13, s12, s11, s10, s9, s8, s7, s6, s5, s4, s3, s2, s1, sell
WRITE #5, t20, t19, t18, t17, t16, t15, t14, t13, t12, t11, t10, t9, t8, t7, t6, t5, t4, t3, t2, t1, sell
WRITE #5, u10, u9, u8, u7, u6, u5, u4, u3, u2, u1, sell
WRITE #5, v6, v5, v4, v3, v2, sell
REM ave stack
WRITE #5, sa20, sa19, sa18, sa17, sa16, sa15, sa14, sa13, sa12, sa11, sa10, sa9, sa8, sa7, sa6, sa5, sa4, sa3, sa2, sa1
WRITE #5, ta10, ta9, ta8, ta7, ta6, ta5, ta4, ta3, ta2, ta1
WRITE #5, ua5, ua4, ua3, ua2, ua1
WRITE #5, va3, va2, va1

CLOSE #5
RETURN

loaddata:
OPEN "c:\qb\stock\yahoo\auusdata.csv" FOR INPUT AS #5
REM raw data
INPUT #5, s40, s39, s38, s37, s36, s35, s34, s33, s32, s31, s30, s29, s28, s27, s26, s25, s24, s23, s22, s21, s20, s19, s18, s17, s16, s15, s14, s13, s12, s11, s10, s9, s8, s7, s6, s5, s4, s3, s2, s1, sell
INPUT #5, t20, t19, t18, t17, t16, t15, t14, t13, t12, t11, t10, t9, t8, t7, t6, t5, t4, t3, t2, t1, sell
INPUT #5, u10, u9, u8, u7, u6, u5, u4, u3, u2, u1, sell
INPUT #5, v6, v5, v4, v3, v2, sell
REM ave stack
INPUT #5, sa20, sa19, sa18, sa17, sa16, sa15, sa14, sa13, sa12, sa11, sa10, sa9, sa8, sa7, sa6, sa5, sa4, sa3, sa2, sa1
INPUT #5, ta10, ta9, ta8, ta7, ta6, ta5, ta4, ta3, ta2, ta1
INPUT #5, ua5, ua4, ua3, ua2, ua1
INPUT #5, va3, va2, va1

CLOSE #5
RETURN



CLOSE #1: CLOSE #2: CLOSE #3
END
shutdown:
CLOSE #1: CLOSE #2: CLOSE #3: CLOSE #4
'OPEN "c:\qb\stock\yahoo\cal.csv" FOR OUTPUT AS #1
'WRITE #1, t1, t2, t3, t3, t5, t6, t7, t8, t9, t10, ta1, ta2, ta3, ta4, ta5, ta6, ta7, ta8, ta9, ta10
'CLOSE #1
END