InvestorsHub Logo
Followers 1
Posts 236
Boards Moderated 0
Alias Born 05/29/2018

Re: None

Monday, 07/13/2020 4:09:19 PM

Monday, July 13, 2020 4:09:19 PM

Post# of 35275
little script to help with your average down endeavors.

I'm sure most of you use stock trading platforms. I do not besides my brokerage account. Anyways, I wrote a quick script in javascript/html for calculating what my average cost would be if i purchased at different quantity increments vs different costs. It's fairly convenient.
Here is a link. You just need to copy all the code, paste it into a text editor like notepad and save it as a .html file and then open it locally in your web browser.

If you want your base price and brokerage fee to always be the same when you open it, you just need to edit the first few lines where those values are set.

https://pastebin.com/M12VCCzd

Here's the lines to edit if you wanted.