v2
Added:
TakeProfit(initPerc, stepPerc, source)
Profit adapted to lowest/highest value of given source and lineary changes after it
Parameters:
initPerc (float): Initial profit value in percent unit
stepPerc (float): Amount of change per every bar since last entry. Posiitive value will decrease profit in time.
source (float): Source according to is profit adapted. If it reach high, profit is increased for long positions, same for lowest price and short positions.
Returns: Profit value lineary increased/decreased and adjusted since last entry. If there is no active trade, value is NaN
StopLoss(initPerc, stepPerc, source)
Stop loss adapted to highest/lowest value of given source and lineary changes after it
Parameters:
initPerc (float): Initial stop loss value in percent unit
stepPerc (float): Amount of change per every bar since last entry. Posiitive value will increase stop loss in time.
source (float): Source according to is stop loss adapted. If it reach high, stop loss is increased for long positions, same for low and short positions.
Returns: Stop loss value lineary increased/decreased and adjusted since last entry. If there is no active trade, value is NaN
Removed:
LinearProfit(initPerc, stepPerc)
Lineary changed profit
AdaptedProfit(initPerc, stepPerc, source)
Profit adapted to lowest/highest value of given source and lineary changes after it
LinearStopLoss(initPerc, stepPerc)
Lineary changed stop loss
AdaptedStopLoss(initPerc, stepPerc, source)
Stop loss adapted to highest/lowest value of given source and lineary changes after it