warning might contain errors of programming or logic or typos
EXPLANATIONS OF SYMBOLS
ms basic program for constant value plan M=money invested total p=Initial price of purchase b=bank or cash resxerve n=number of shares sv=stock value ,share value a=action or amount bought or sold z=amount devoted to stock purchase in decimals e.g. .75 np=new price
ACTUAL PROGRAM 1 rem may contain errors of programming or logic or typos . Use at own risk. entertainment purposes only. 10 input "money";M 20 input "initial price";p 30 input "z in decimals (0- 1)";z 40 rem input part 50 b=m-z*m 60 n=z*m/p 70 sv=z*m 80 input "new price"; np 90if np =0 goto 250 100 a=sv-n-*np 110 if a = 0 goto 80 120 if a >0 goto 140 130if a<0 goto 200 140 a=abs(a):if a>b then a=b 150 n=n+a/np 160 b=b-a 170print "buy shares"; a/np 180 goto 80 190END 200 a=abs(a):if n-a/np<0 then a=n*np 210 n=n-a/np 220 b=b+a 230print "sell shares";a/np 240 goto 80 250 print sv + b 260 rem constant value algorithm in ms basic by infooverload .Due diligence please
YOU CAN USE JUST BASIC FOR WINDOWS AND HOT PAW BASIC FOR MACS AND WINDOWS TO RUN IT OR OLDDOS DOWNLOAD FROM MICROSOFT TO DOWNLOAD QBASIC FOR WINDOWS
PLAY WITH AND ENJOY IT TO EXPERIMENT WITH IT AS YOU LIKE.
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.