helpers/helpers
library
Functions
-
addVAT(double price, double vatRate)
→ double
-
Adds VAT to a price.
-
adjustEntryPriceForFees(double price, double fees, {bool isShortPosition = false})
→ double
-
-
adjustEntryPriceForSlippage(double price, bool isShortPosition = false})
→ double
-
-
adjustExitPriceForFees(double price, double fees, {bool isShortPosition = false})
→ double
-
-
adjustStopLossPriceForSlippage(double price, bool isShortPosition = false})
→ double
-
-
applyDiscount(double price, {double? discountAmount, double? discountRate})
→ double
-
Applies a discount to a given price.
-
calculateTip(double price, double tipRate)
→ double
-
Calculates the tip on a price before VAT.
-
computeBreakEvenUnits({double? sellingExpensePerUnitAmount = 0, double? buyingExpensePerUnitAmount = 0, double? sellingExpensePerUnitRate = 0, double? buyingExpensePerUnitRate = 0, double? operatingExpenses = 0, double? sellingPrice = 0, double? buyingPrice = 0})
→ double
-
-
computeCostOfGoodsSold({double? buyingExpensePerUnitAmount = 0, double? buyingExpensePerUnitRate = 0, double? expectedSaleUnits = 0, double? buyingPrice = 0})
→ double
-
-
computeCostOfInvestment({double? sellingExpenses = 0, double? costOfGoodsSold = 0})
→ double
-
-
computeGrossProfit({double? costOfGoodsSold = 0, double? revenue = 0})
→ double
-
-
computeGrossProfitMargin({double? grossProfit = 0, double? revenue = 0})
→ double
-
-
computeNetProfit({double? operatingProfit = 0, double? taxAmount = 0})
→ double
-
-
computeNetProfitMargin({double? netProfit = 0, double? revenue = 0})
→ double
-
-
computeOperatingProfit({double? grossProfit = 0, double? sellingExpenses = 0})
→ double
-
-
computePipDelta({double? entryPrice = 0, double? exitPrice = 0, num pipDecimalPlaces = 0})
→ double
-
-
computePipValue({double? counterToAccountCurrencyRate = 0, bool? isAccountCurrencyCounter = false, double? instrumentPairRate = 0, int? pipDecimalPlaces = 0, double? positionSize = 0})
→ double
-
-
computeReturnOnInvestment({double? costOfInvestment = 0, double? netProfit = 0})
→ double
-
-
computeRevenue({double? expectedSaleUnits = 0, double? sellingPrice = 0})
→ double
-
-
computeRiskRewardRatio({double? rewardAmount, double? riskAmount})
→ double
-
-
computeTaxAmount({double? operatingProfit = 0, double? taxRate = 0})
→ double
-
-
computSellingExpenses({double? sellingExpensePerUnitAmount = 0, double? sellingExpensePerUnitRate = 0, double? operatingExpenses = 0, double? expectedSaleUnits = 0, double? sellingPrice = 0})
→ double
-
-
findFavoriteCurrencies(List<FastItem<MatexInstrumentMetadata>> items)
→ List<FastItem<MatexInstrumentMetadata>>
-
-
findFavoriteInstuments(List<FastItem<MatexFinancialInstrument>> items)
→ List<FastItem<MatexFinancialInstrument>>
-
Filters a list of
FastItem objects to return only the items that
correspond to the currency pairs marked as "favorite" in
the favorites list.
-
getLabelTextForInstrumentType(String type)
→ String
-
-
getShareAmount({required double accountBalance, required double risk, required double entryPrice, required double stopLossPrice, double entryFees = 0.0, double exitFees = 0.0, double slippage = 0.0, bool fractionalStocks = false, bool isShortPosition = false})
→ double
-
-
getTipAmount(double price, double tipRate)
→ double
-
Calculates the tip amount for a given price and tip percentage.
-
getTipRate(double price, double tipAmount)
→ double
-
Calculates the tip rate based on the price and tip amount.
-
getVATAmount(double price, double vatRate)
→ double
-
Calculates the VAT amount for a given price and VAT rate.
-
isCurrencyFavorite(String currencyCode, {List<String>? favorites})
→ bool
-
Determines whether the currency code is marked as favorite or not
based on the list of favorite currency codes.
-
isInstrumentFavorite(String base, String countrer, {List<MatexInstrumentFavorite>? favorites})
→ bool
-
Determines whether the financial instrument is marked as favorite or not
based on the list of favorite instruments
-
pivotPointsCamarilla(double? high, double? low, double? close)
→ MatexPivotPointsCalculatorResults
-
-
pivotPointsDeMark(double? high, double? low, double? close, double? open)
→ MatexPivotPointsCalculatorResults
-
-
pivotPointsFibonacci(double? high, double? low, double? close)
→ MatexPivotPointsCalculatorResults
-
-
pivotPointsStandard(double? high, double? low, double? close)
→ MatexPivotPointsCalculatorResults
-
-
pivotPointsWoodie(double? high, double? low, double? close)
→ MatexPivotPointsCalculatorResults
-
-
removeVAT(double priceWithVAT, double vatRate)
→ double
-
Removes the VAT from a price.