home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
busi
/
tas2091.zip
/
LIMIT.TAS
< prev
next >
Wrap
Text File
|
1991-02-17
|
881b
|
36 lines
{ limit.tas
This is an example of using a TAS script to watch your
stocks.
It checks the ticker symbol against one of several
which you might (and I do) own. If the current close
(shown as 'c[0]' is greater than the limit for profit
or less than the stop loss, a message is generated.
}
stop_loss := 0;
sell_profit := 0;
if ticker = 'aapl' then
if c > 47 then
sell_profit := 1;
else
if c < 41 then
stop_loss := 1;
if ticker = 'gr' then
if c > 43 then
sell_profit := 1;
else
if c < 38 then
stop_loss := 1;
if ticker = 'la' then
if c > 27 then
sell_profit := 1;
else
if c < 10 then
stop_loss := 1;
if stop_loss = 1 then
writeln(ticker, ' has reached your STOP LOSS limit. SELL');
if sell_profit = 1 then
writeln(ticker, ' has reached your Profit target. SELL');