A modern web application to help traders calculate their optimal position size before entering a trade. Built with Next.js, React, and TypeScript, this tool ensures that traders can manage their risk effectively.
- User Inputs: Accepts portfolio balance, risk percentage, stop loss percentage, and leverage.
- Real-Time Calculation: Computes the position size dynamically based on user inputs.
- Responsive Design: Optimized for both desktop and mobile devices.
- Modern Tech Stack: Built with Next.js, React, and TypeScript for scalability and maintainability.
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/YKUNAKORN/Position-Size-Calculator.git cd position-size-calculator -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:3000
position-size-calculator/
├── src/
│ ├── pages/ # Next.js pages
│ │ ├── index.tsx # Main page
│ │ ├── _app.tsx # App wrapper
│ ├── styles/ # CSS modules
│ │ ├── Home.module.css # Styles for the home page
│ ├── utils/ # Utility functions
│ ├── calculatePositionSize.ts # Logic for position size calculation
├── public/ # Static assets
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
- Enter your Portfolio Balance in USDT.
- Specify the Risk of Ruin percentage.
- Enter the Stop Loss percentage.
- Provide the Leverage value.
- Click the Calculate button to see the recommended position size.
- Next.js: Framework for server-side rendering and static site generation.
- React: JavaScript library for building user interfaces.
- TypeScript: Superset of JavaScript for type safety.
- CSS Modules: Scoped and modular CSS for styling.
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.
For any questions or feedback, feel free to reach out at [[email protected]].