Question: I was wondering if there are any ledgers to make such entries. I trade regularly and I would like to make a good record of it.

Answer: 
Have a look at the Asset functionality of common accounting packages. It allows you to record prices and quantities of 'things' at purchase and sale. For shares, each stock code can be considered a separate 'thing' with buy and sell prices and quantities held in 'inventory'.

Each accounting package has its own processes and it takes awhile to become familiar with them. Here are some steps to get you started with gnucash, which is "[personal and small-business financial-accounting software, freely licensed under the GNU GPL](https://www.gnucash.org/)". (Disclaimer: I've starting using the software fairly recently, but I'm not otherwise knowingly affiliated with gnucash.)

1. Download and install [gnucash](https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-setup1.html).
2. Open gnucash and Select menu item File -> New File. If a dialog pops up asking you to save changes to the (default) file, select "Continue Without Saving". This brings up the New Account Hierarchy Setup dialog.
3. Fill in whatever you like until you reach "Choose accounts to create". Here, select "Investment Accounts" for some defaults to start you off. Carry on with the rest of the dialog.
4. You'll be asked to save the file. Pick a filename you like, such as "Shares 2018". Pick a location (directory or folder), but be aware that gnucash will save lots of temporary and backup files in the same location. The filename you pick will be the main file, and once you quit gnucash, the rest can usually be safely deleted. However, you might want to keep them as backups. Make sure you click "Save" often (see the menu ribbon below the "File" menu) to ensure that your main gnucash file is up to date.
5. After saving, you'll see the chart of accounts. Here's a [link](https://www.gnucash.org/docs/v3/C/gnucash-guide/chapter_invest.html) to the gnucash manual for the chapter called "Investments". Follow [the instructions](https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-setup1.html) to set up your investment portfolio, then use the manual for further instructions about buying and selling shares, recording dividends, and so on.

Have fun!
Since softwares are being recommended I can post my comment as an answer:

The shareware software, KBH Investor Accounting, accounts both long and short positions and computes an overall mark-to-market accounting. The realized buy/sell transactions can be printed out in the form of an IRS 4797 but assumes that no long term positions are included to make that form. Most investors do not use a 4797 but might want the print-out.

For most investors, the overall mark-to-market accounting is not a tax accounting but a portfolio performance accounting.

Note that editing of an accounting is done by installing the back-up files. But the original files, with a time stamp, are also kept in the folder.