I have tried to show you my work as best as I could most of these codes will return different %, mainly because I tried to show you how I messed around with % ordered, commission cost and also when the stock was bought and sold. I know this doesn't use any moving average and I hope you don't mind I tried writing this code instead of the one provided, I found this code off of youtube.com. and then changed it by what % I bought, when I sold and how many companies I invested in. I hope you like it and see I work hard on this project! also really enjoyed this project!