1.5.12 • Published 6 months ago

@debut/plugin-grid v1.5.12

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

@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

NameTypeDescription
stepnumberGrid step, percentage. The step is always the same if the fibo option is not activated
fibonumberCalculation of Fibonacci levels. Each next level of the grid is equal to previous x fibo, value range from 1 to 2, default is disabled
martingalenumberMartingale 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
levelsCountnumberThe number of grid levels, the more the more funds you need
takeProfitnumberTake profit as a percentage. Calculated as the total profit from open positions in relation to the initial capital
stopLossnumberStop 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*
reduceEquitybooleanEach next grid start lot will reduced
trailingbooleandefault - false, true mean trailing profit apllied to last or first order after grid take reached
collapsebooleandefault - 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)

1.5.12

6 months ago

1.5.9

1 year ago

1.5.10

1 year ago

1.5.11

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.0

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.5.0-beta.0

2 years ago

1.5.0-beta.2

2 years ago

1.5.0-beta.1

2 years ago

1.3.4-esm.0

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.3-beta.0

2 years ago

1.2.4-beta.0

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.17

2 years ago

1.1.9

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago