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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@debut/plugin-grid

v1.5.12

Published

Martingale or linear grid based trades

Downloads

93

Readme

@debut/plugin-grid

The Debut plugin allows you to organize the operation of strategies on a grid system (DCA). It is a system of additional purchases with an increase in volumes at each additional purchase by martingale. To open trades, grid levels with a fixed distance between them are used. It is also possible to use the Fibonacci distance between the levels.

Install

npm install @debut/plugin-grid --save

Settings

| Name | Type | Description | | ----------- | ---------- | ------------ | | step | number | Grid step, percentage. The step is always the same if the fibo option is not activated | | fibo | number | Calculation of Fibonacci levels. Each next level of the grid is equal to previous x fibo, value range from 1 to 2, default is disabled | | martingale | number | Martingale coefficient. Determines the number of lots for a trade. In the classic martingale system it is equal to 2, which means that we always double the lot of the previous deal, if 1 - the lot will be fixed | | levelsCount | number | The number of grid levels, the more the more funds you need | | takeProfit | number | Take profit as a percentage. Calculated as the total profit from open positions in relation to the initial capital | | stopLoss | number | Stop loss in percentage. (May be Infinity assigned, this is correct number type ) It is calculated by the sum of all open positions, as well as takeProfit* | | reduceEquity | boolean | Each next grid start lot will reduced | | trailing | boolean | default - false, true mean trailing profit apllied to last or first order after grid take reached | | collapse | boolean | default - false, true mean orders closing will be collapsed in to single request |

* Stop/Take does not work on the basis of price, but on the basis of a percentage of funds.

Plugin initialization

import { gridPlugin, GridPluginOptions } from '@debut/plugin-grid';

// ...
export interface MyStrategyOptinos extends DebutOptions, GridPluginOptions;

export class MyStrategy extends Debut {
    declare plugins: GridPluginAPI;
    constructor(transport: BaseTransport, opts: CCISolderGOptions) {
        super(transport, opts);

        this.registerPlugins([
            // ...
            gridPlugin(this.opts),
            // ...
        ]);
    }

    onCandle(candle) {
        // Grid can created manually withoun order
        // if (!this.ordersCount) {
        //     this.plugins.grid.createGrid(candle.c;
        // }

        // By default, the grid is created automatically, instead of closing the first order at a loss
    }

Screenshots (by report plugin Report)