Class PriceCalculator
- Namespace
- FinanceSharp.Helpers
- Assembly
- FinanceSharp.dll
public static class PriceCalculator
- Inheritance
-
PriceCalculator
- Inherited Members
Methods
CalculateProfit(BuyStyle, TickValue, TickValue, double)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, TickValue to, double budget)
Parameters
Returns
CalculateProfit(BuyStyle, TickValue, TickValue, int)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, TickValue to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, TickValue, double, double)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, double to, double budget)
Parameters
Returns
CalculateProfit(BuyStyle, TickValue, double, int)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, double to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, TickValue, float, int)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, float to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, TickValue, float, float)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, TickValue from, float to, float budget)
Parameters
Returns
CalculateProfit(BuyStyle, double, TickValue, double)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, double from, TickValue to, double budget)
Parameters
Returns
CalculateProfit(BuyStyle, double, TickValue, int)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, double from, TickValue to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, double, double, double)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, double from, double to, double budget)
Parameters
Returns
CalculateProfit(BuyStyle, double, double, int)
public static (double Profit, int Quantity) CalculateProfit(BuyStyle style, double from, double to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, float, TickValue, float)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, float from, TickValue to, float budget)
Parameters
Returns
CalculateProfit(BuyStyle, float, float, double)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, float from, float to, double budget)
Parameters
Returns
CalculateProfit(BuyStyle, float, float, int)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, float from, float to, int quantity)
Parameters
Returns
CalculateProfit(BuyStyle, float, float, float)
public static (float Profit, int Quantity) CalculateProfit(BuyStyle style, float from, float to, float budget)
Parameters
Returns
CalculateQuantity(BuyStyle, TickValue, double)
public static int CalculateQuantity(BuyStyle style, TickValue from, double budget)
Parameters
Returns
CalculateQuantity(BuyStyle, double, double)
public static int CalculateQuantity(BuyStyle style, double from, double budget)
Parameters
Returns
CalculateQuantity(BuyStyle, float, double)
public static int CalculateQuantity(BuyStyle style, float from, double budget)
Parameters
Returns
CalculateQuantity(BuyStyle, float, float)
public static int CalculateQuantity(BuyStyle style, float from, float budget)
Parameters
Returns
CalculateTrade(BuyStyle, double, double, long, long, double)
public static Trade CalculateTrade(BuyStyle style, double from, double to, long timefrom, long timeto, double budget)
Parameters
Returns
CalculateTrade(BuyStyle, double, double, long, long, int)
public static Trade CalculateTrade(BuyStyle style, double from, double to, long timefrom, long timeto, int quantity)
Parameters
styleBuyStylefromdoubletodoubletimefromlongtimetolongquantityintNon absolute quantity of the trade
Returns
CalculateTrade(BuyStyle, long, TickValue, long, TickValue, double)
public static Trade CalculateTrade(BuyStyle style, long fromTime, TickValue from, long toTime, TickValue to, double budget)
Parameters
Returns
EntryPrice(BuyStyle, TickValue)
Extracts the right price (bid or ask) for entering the market based on given purchase style.
public static double EntryPrice(BuyStyle style, TickValue tick)
Parameters
Returns
EntryPrice(TickValue, BuyStyle)
Extracts the right price (bid or ask) for entering the market based on given purchase style.
public static double EntryPrice(this TickValue tick, BuyStyle style)
Parameters
Returns
ExitPrice(BuyStyle, TickValue)
Extracts the right price (bid or ask) for entering the market based on given purchase style.
public static double ExitPrice(BuyStyle style, TickValue tick)
Parameters
Returns
ExitPrice(TickValue, BuyStyle)
Extracts the right price (bid or ask) for entering the market based on given purchase style.
public static double ExitPrice(this TickValue tick, BuyStyle style)
Parameters
Returns
LimitAtProfit(BuyStyle, TickValue, int, double)
public static double LimitAtProfit(BuyStyle style, TickValue tick, int quantity, double profitDollar)
Parameters
styleBuyStyleThe trade style
tickTickValuequantityintAbsolute quantity
profitDollardoubleProfit in dollars, can be negative if loss planned
Returns
LimitAtProfit(BuyStyle, double, int, double)
public static double LimitAtProfit(BuyStyle style, double price, int quantity, double profitDollar)
Parameters
styleBuyStyleThe trade style
pricedoublePrice of the stock
quantityintAbsolute quantity
profitDollardoubleProfit in dollars, can be negative if loss planned
Returns
LimitAtProfit(BuyStyle, double, int, float)
public static double LimitAtProfit(BuyStyle style, double price, int quantity, float profitPrecentage)
Parameters
styleBuyStyleThe trade style
pricedoublePrice of the stock
quantityintAbsolute quantity
profitPrecentagefloatProfit in precentages, can be negative if loss planned. examples: 0.05f is 0.05% profit.