Pine script 如何以百分比而不是pine脚本中的“pips”计算takeprofit和stoploss?

Pine script 如何以百分比而不是pine脚本中的“pips”计算takeprofit和stoploss?,pine-script,trading,Pine Script,Trading,我想知道如何用百分比来计算takeprofit和stoploss,而不是pips 表示两种货币之间价值变化的计量单位称为“pip” 示例代码取自 在示例代码中,牵引停止的pip值为固定值和200,这将是000200价格变化 //@version=4 ... // the risk management inputs inpTakeProfit = input(defval = 1000, title = "Take Profit", minval = 0) inpStop

我想知道如何用百分比来计算takeprofit和stoploss,而不是
pips

表示两种货币之间价值变化的计量单位称为“pip”

示例代码取自

在示例代码中,牵引停止的
pip
值为固定值和200,这将是
000200
价格变化

//@version=4
...
// the risk management inputs
inpTakeProfit   = input(defval = 1000, title = "Take Profit", minval = 0)
inpStopLoss     = input(defval = 200, title = "Stop Loss", minval = 0)
inpTrailStop    = input(defval = 200, title = "Trailing Stop Loss", minval = 0)
strategy.exit("L_TP", from_entry = "Long", trail_points = inpTrailStop)
strategy.exit("S_TP", from_entry = "Short", trail_points = inpTrailStop)