npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minimalist-money-management-calculator

v0.1.0

Published

Set of utility functions for CFD money management with bunjs

Downloads

22

Readme

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.