minimalist-money-management-calculator

0.1.0 • Public • Published

Minimalist money management calculator

Minimalist utility for index(DAX40, CAC40, etc..) position calculation with bunjs

Background

Bun is the lastest and arguably the fastest runtime environment for javascript, similar to node and deno. Bun uses JSC (JavaScriptCore) engine unlike node and deno which is the part of the reason why it's faster than node and deno.

Bun is written in a low-level manual memory management programming language called ZIG.

Bun supports ~90% of the native nodejs APIs including fs, path etc. and also distribute it's packages using npm hence both yarn and npm are supported in bun.

DevNote:

Although this version is actively still under development so also is bunjs and might contain some bugs, hence, not ideal for a production app.

Disclaimer

This software is for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.

Always start by running your trading bot in Dry-run and do not engage money before you understand how it works and what profit/loss you should expect.

Prerequisite

🐎 Bun - Bun needs to be installed locally on your development machine.

Installation

💻 To install bun head over to the offical website and follow the installation instructions.

🧑‍💻 To install run

$ bun add minimalist-money-management-calculator

NOTE

Although this library is distributed under npm, this library is only available for bun, node and deno are not currently supported.

Usage

Importing into the application

import { Risk } from "minimalist-money-management-calculator";

// initializing strategy 
const strategy = new Risk({
    initialBalance: 1000,
    riskPerPos: 1
})

// get trading volume for one trade
const tradeVolume = strategy.volume({ unitPerLotStandard: 25, lotStep: 0.01 }, { stopDistance: 5 })

Contribute

PRs for features, enhancements and bug fixes are welcomed. ✨ You can also look at the todo file for feature contributions.

License

This software is distributed under the MIT license.

Package Sidebar

Install

npm i minimalist-money-management-calculator

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

20.5 kB

Total Files

12

Last publish

Collaborators

  • dtczelo