@ixily/activ
Version:
Alpha Capture Trade Idea Verification. Blockchain ownership proven trade ideas and strategies.
36 lines (35 loc) • 1.59 kB
TypeScript
import { CONTRACT_INTERFACES } from '../../';
interface ITradeIdeaResultCalculationStepPriorTranch {
qty: number;
price: number;
action: 'buy' | 'sell';
}
interface ITradeIdeaResultCalculationStepPriorReturn {
iValue: number;
buys: number;
sells: number;
cash: number;
}
interface ITradeIdeaResultCalculationStepPrior {
qty: number;
price: number;
direction: 'long' | 'short';
description: string;
tranches: ITradeIdeaResultCalculationStepPriorTranch[];
return: ITradeIdeaResultCalculationStepPriorReturn;
}
export declare const calculateResultProcess: (openRecommendation: CONTRACT_INTERFACES.ITradeIdea, adjustRecommendations: CONTRACT_INTERFACES.ITradeIdea[], closeRecommendation: CONTRACT_INTERFACES.ITradeIdea | undefined) => {
calculation: ITradeIdeaResultCalculationStepPrior[];
profit: CONTRACT_INTERFACES.ITradeIdeaResultProfit;
};
export declare const calculateProfitTranches: (tranches: ITradeIdeaResultCalculationStepPriorTranch[], data: ITradeIdeaResultCalculationStepPriorReturn, calculationArray: ITradeIdeaResultCalculationStepPrior[]) => CONTRACT_INTERFACES.ITradeIdeaResultProfit;
/**
* Adds a little more detail to our data
*
* @export
*/
export declare const enrichTrades: (calculations: ITradeIdeaResultCalculationStepPrior[], adjustsMetas: CONTRACT_INTERFACES.ITradeIdea[]) => CONTRACT_INTERFACES.ITradeIdeaResultCalculationStep[];
export declare const IdeaPerformanceModule: {
getIdeaPerformance: (tradeIdeas: CONTRACT_INTERFACES.ITradeIdea[]) => CONTRACT_INTERFACES.ITradeIdeaResult;
};
export {};