export declare class Trade { private _magic_number?; private _slippage?; private _lot_size?; private _symbol?; private _price?; private _price_latest?; private _tp_pips?; private _sl_pips?; private _tp_price?; private _sl_price?; private _comment?; /** * @param magic_number Magic number of a trade */ magic(magic_number: number): this; /** * @returns current magic number of this trade builder */ getMagic(): number | undefined; /** * * @param slippage_in_points buffer size of a trade when price slip to this range then trade will execute */ slippage(slippage_in_points: number): this; /** * @returns current slippage of this trade builder */ getSlippage(): number | undefined; /** * * @param lot_size Trade volume size */ lotSize(lot_size: number): this; /** * @returns volume size */ getLotSize(): number | undefined; /** * * @param symbol_name select a symbol for the trade builder */ symbol(symbol_name: string): this; /** * @returns selected symbol of current trade builder */ getSymbol(): string | undefined; /** * * @param price set price for execute trade on this price */ price(price: number): this; /** * Trade will execute in MT5 using latest price of the market */ latestPrice(): this; /** * @returns trade price */ getPrice(): number | undefined; /** * * @param tp_in_pips set takeprofit in pips */ takeProfit(tp_in_pips: number): this; /** * * @param tp_in_price set takeprofit in price value */ takeProfitPrice(tp_in_price: number): this; /** * @returns takeprofit in pips or price */ getTakeProfit(): number | undefined; /** * * @param sl_in_pips set stoploss in pips */ stopLoss(sl_in_pips: number): this; /** * * @param sl_in_price set stoploss in price value */ stopLossPrice(sl_in_price: number): this; /** * @returns stoploss in pips or price */ getStopLoss(): number | undefined; /** * * @param comment set comment of an order */ comment(comment: string): this; /** * @return comment */ getComment(): string | undefined; /** * Buy - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price or price latest * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ buy(): Promise; /** * BuyStop - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ buyStop(): Promise; /** * BuyLimit - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ buyLimit(): Promise; /** * Sell - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price or price latest * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ sell(): Promise; /** * SellStop - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ sellStop(): Promise; /** * SellLimit - requires * 1. magic number * 2. slippage * 3. lot size * 4. symbol name * 5. price * 6. tp_pips or tp_price * 7. sl_pips or sl_price */ sellLimit(): Promise; /** * Checks parameters are set correctly or throw error */ private analyzeVars; /** * Requires - * 1. takeprofit price * 2. stoploss price * @param position_ticket position which to modify */ modifyPosition(position_ticket: number): Promise; /** * Requires - * 1. price * 2. takeprofit price * 3. stoploss price * @param order_ticket Order which to modify */ modifyOrder(order_ticket: number): Promise; /** * @param position_ticket Position which to delete */ static deletePosition(position_ticket: number): Promise; /** * @param order_ticket Order which to delete */ static deleteOrder(order_ticket: number): Promise; /** * List all Positions info */ static allPositions(): Promise; /** * List all Orders Info */ static allOrders(): Promise; /** * List all History Info */ static allHistory(): Promise; } export interface PositionInfo { ticket: number; time: string; updateTime: string; positionType: PositionType; magic: number; positionId: number; lotSize: number; openPrice: number; stoploss: number; takeprofit: number; currentPrice: number; commission: number; swap: number; profit: number; symbol: string; comment: string; } export declare enum PositionType { BUY = 0, SELL = 1 } export interface OrderInfo { ticket: number; setupTime: string; orderType: OrderType; state: string; timeDone: string; typeFilling: string; typeTime: string; magic: number; positionId: number; initialVolume: number; currentVolume: number; openPrice: number; stoploss: number; takeprofit: number; currentPrice: number; symbol: string; comment: string; } export declare enum OrderType { BUY_STOP = 0, BUY_LIMIT = 1, SELL_STOP = 2, SELL_LIMIT = 3 } export interface HistoryInfo { ticket: number; time: string; dealType: DealType; magic: number; positionId: number; volume: number; entryType: EntryType; symbol: string; comment: string; swap: number; commission: number; price: number; profit: number; } export declare enum DealType { BUY = 0, SELL = 1, UNKNOWN = 2 } export declare enum EntryType { IN = 0, OUT = 1 }