@gbozee/ultimate 0.0.2-43 → 0.0.2-46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,78 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ export declare function profitHelper(longPosition: any, shortPosition: any, config?: any, contract_size?: number, balance?: number): {
4
+ long: any;
5
+ short: any;
6
+ };
7
+ export declare function getParamForField(self: any, configs: any[], field: string, isGroup?: string): any | any[];
8
+ export declare function getTradeEntries(entry: number, min_size: number, kind: "long" | "short", size: number, spread?: number): {
9
+ entry: number;
10
+ size: number;
11
+ }[];
12
+ export declare function extractValue(_param: any, condition: boolean): any;
13
+ export declare function asCoins(symbol: string): string;
14
+ export declare const SpecialCoins: string[];
15
+ export declare function allCoins(symbols: string[]): string[];
16
+ export declare function formatPrice(value: number, opts?: {
17
+ locale?: string;
18
+ currency?: string;
19
+ }): string;
20
+ export declare function to_f(value: string | number, places?: string): number;
21
+ export declare function determine_stop_and_size(entry: number, pnl: number, take_profit: number, kind?: string): number;
22
+ export declare const range: (start: number, stop: number, step?: number) => number[];
23
+ export declare function determine_amount_to_sell(entry: number, quantity: number, sell_price: number, pnl: number, kind: "long" | "short", places?: string): number;
24
+ export declare function determine_position_size({ entry, stop, budget, percent, min_size, notional_value, as_coin, places, }: {
25
+ entry: number;
26
+ stop?: number;
27
+ budget?: number;
28
+ percent?: number;
29
+ notional_value?: number;
30
+ min_size?: number;
31
+ as_coin?: boolean;
32
+ places?: string;
33
+ }): number;
34
+ export declare function determine_remaining_entry({ risk, max_size, stop_loss, kind, position, }: {
35
+ risk: number;
36
+ max_size: number;
37
+ stop_loss: number;
38
+ kind: string;
39
+ position: {
40
+ quantity: number;
41
+ entry: number;
42
+ };
43
+ }): number;
44
+ export declare function determine_average_entry_and_size(orders: Array<{
45
+ price: number;
46
+ quantity: number;
47
+ }>, places?: string, price_places?: string): {
48
+ entry: number;
49
+ price: number;
50
+ quantity: number;
51
+ };
52
+ export declare const createArray: (start: number, stop: number, step: number) => number[];
53
+ export declare const groupBy: (xs: any[], key: string) => any;
54
+ export declare function fibonacci_analysis({ support, resistance, kind, trend, places, }: {
55
+ support: number;
56
+ resistance: number;
57
+ kind?: string;
58
+ trend?: string;
59
+ places?: string;
60
+ }): number[];
61
+ export declare const groupIntoPairs: (arr: any[], size: number) => any[][];
62
+ export declare const groupIntoPairsWithSumLessThan: (arr: any[], targetSum: number, key?: string, firstSize?: number) => any[][];
63
+ /**
64
+ * This function computes the cummulative entry and size for each trade
65
+ * @param trades The trades for which the cummulative entry and size will be computed
66
+ * @param config The current config
67
+ * @returns An array of trades with the cummulative entry and size
68
+ */
69
+ export declare const computeTotalAverageForEachTrade: (trades: any[], config: any) => any[];
70
+ export declare function getDecimalPlaces(numberString: string | number): number;
71
+ export declare function createGapPairs<T>(arr: T[], gap: number, item?: T): [
72
+ T,
73
+ T
74
+ ][];
75
+ export declare function logWithLineNumber(...args: any[]): void;
3
76
  export type SignalConfigType = {
4
77
  focus: number;
5
78
  budget: number;
@@ -149,15 +222,6 @@ export type GlobalConfig = {
149
222
  risk_reward: number;
150
223
  reverse_factor: number;
151
224
  };
152
- export declare function determine_average_entry_and_size(orders: Array<{
153
- price: number;
154
- quantity: number;
155
- }>, places?: string, price_places?: string): {
156
- entry: number;
157
- price: number;
158
- quantity: number;
159
- };
160
- export declare const createArray: (start: number, stop: number, step: number) => number[];
161
225
  export type AppConfig = {
162
226
  fee: number;
163
227
  risk_per_trade: number;
@@ -277,5 +341,14 @@ export declare function determine_break_even_price(payload: {
277
341
  price: number;
278
342
  direction: string;
279
343
  };
344
+ export declare function determine_amount_to_buy(payload: {
345
+ orders: any[];
346
+ kind: "long" | "short";
347
+ decimal_places?: string;
348
+ price_places?: string;
349
+ place?: boolean;
350
+ position: any;
351
+ existingOrders: any[];
352
+ }): any[];
280
353
 
281
354
  export {};