I offer this program for testing.
No holds barred. Be tough on this program.. If you find any problems, feel free to state the flaws. (I used cross reference and received no warnings)
This program is aimed at a device with a keyboard and mouse.(mouse for moving the calculator to a nice spot)
How to use:
* First type the value of the stock you want to buy and press ENTER
* Then type the amount of money you want to invest and press ENTER
*The amount of stocks you can buy will be displayed bellow that AND
3 optional sell prices with projected profits for each one.
After you are done with the current display press ENTER and a new calculator will be ready
Code: Select all
LET bf=10:REM <<<<< Your Banking fee per transaction ***
PROCgraphics(155,505)
REM You must accept ALL financial risks from using this program before using it
REM This program is a demo.
REM The Author of this program offers no promise of reliability or usefullness
REPEAT
CLS
PROCsbox(5,10,300,200,"7")
PROCsbox(5,215,300,405,"10")
PROCsbox(5,415,300,605,"3")
PROCsbox(5,620,300,810,"15")
PROCsbox(5,815,300,1000,"15")
MOVE 10,190:GCOL 4: PRINT"STOCK SELL PRICE "
MOVE 10,380:PRINT"STOCK SELL PRICE "
MOVE 10,580:PRINT"STOCK SELL PRICE "
MOVE 10,790:PRINT"SHARES TO BUY "
GCOL 0
MOVE 10,980:PRINT"STOCK PRICE "
MOVE 10,910:PRINT"AMOUNT TO SPEND "
amount=0:vlu=0:tt=0:e$="":round%=0
GCOL 0
GCOL 128+15:REM background color black for text
MOVE 5,950:INPUT " : ",amount
REPEAT
MOVE 5,880: INPUT "$$ ",vlu
GCOL 0
REM INPUT " Amount you want to invest : ",value
UNTIL vlu>0
vlu=vlu-10:REM this is the amount your bank charges you for transaction. (adjust for you)
tt=vlu/amount
round%=tt
MOVE 10,760:PRINT " SHARES "+STR$(round%)
REPEAT
otheramt+=0.01
profit=round%*otheramt
UNTIL profit>vlu+30 :REM you must make this work out to around $30 profit
MOVE 10,150:PRINT " "+STR$(otheramt)
PRINT" PROFIT $ "+STR$(profit-vlu-bf)
REPEAT
otheramt+=0.01
profit=round%*otheramt
UNTIL profit>vlu+50 :REM you must make this work out to around $50 profit
MOVE 10,350:PRINT " "+STR$(otheramt)
PRINT " PROFIT $ "+STR$(profit-vlu-bf)
REPEAT
otheramt+=0.01
profit=round%*otheramt
UNTIL profit>vlu+100 :REM you must make this work out to around $100 profit
MOVE 10,550
PRINT " "+STR$(otheramt)
PRINT " PROFIT $ "+STR$(profit-vlu-bf)
PRINT
MOVE 0,0
INPUT "@",e$
PRINT "************************************************************"
CLS
UNTIL FALSE
END
REM lets stick with 16 colors **********************************************************************
DEF PROCsbox(x%,y%,w%,h%,c$)
LOCAL ry%,sx%,sy%
sx%=x%:sy%=y%
IF x%>w% THEN x%=w%:w%=sx%
IF y%>h% THEN y%=h%:h%=sy%
ry%=y%
GCOL VAL(c$)
REPEAT
LINE x%,y%,w%,y%
y%=y%+1
UNTIL y%=h%
y%=ry%
IF c$<>"0" THEN GCOL 0 ELSE GCOL 15
LINE x%+2,y%+2,w%-2,y%+2
LINE w%-2,y%+2,w%-2,h%-4
LINE w%-2,h%-4,x%+2,h%-4
LINE x%+2,h%-4,x%+2,y%+2
ENDPROC
DEF PROCgraphics(x,y)
VDU 23,22,x;y;8,15,16,1
VDU 5
ENDPROC