Min.Sell.Buy.Price.Gain: Minimum Sell or Buy Prices

View source: R/personal_functions.R

Min.Sell.Buy.Price.GainR Documentation

Minimum Sell or Buy Prices

Description

This function gives you the minimum sell price after you buy or the minimum buy price after you sell with a selected fee percentage and desired gain percentage.

Usage

Min.Sell.Buy.Price.Gain(Price, Gain.Per = 1, Fee.Per = 0.1, Round = 2)

Arguments

Price

numeric. Buy or sell price.

Gain.Per

numeric. Gain percentage. Default is 1.

Fee.Per

numeric. Fee percentage. Default is 0.1.

Round

numeric. Decimal rounding. Default is 2.

Details

This is a personal function of the package author. So, it won't make sense to others.

Value

Two messages: one for BUY Price, one for SELL Price.

Author(s)

Omer Kara

Examples

Min.Sell.Buy.Price.Gain(Price = 100)
Min.Sell.Buy.Price.Gain(Price = 100, Gain.Per = 1.5)
Min.Sell.Buy.Price.Gain(Price = 100, Fee.Per = 0.01)
Min.Sell.Buy.Price.Gain(Price = 100, Gain.Per = 2.5, Fee.Per = 0.05, Round = 4)


omerkara/okara documentation built on Nov. 21, 2023, 7:56 p.m.