Documentation/AlgoCode/Function reference
stop
Stop loss from entry, in points, percent, or ATR.
stop 10 points
Write a number or an input name followed by points, percent, or atr. stop 2 atr is 2 × ATR(14) as a price distance (same as points after the ATR is measured). Live quantity and exchange still come from Deploy.
Return value
—
Note
- Also: stop 2 percent, stop 2 atr (2 × ATR of 14).
Example
when ema(9) crosses above ema(21) buy stopPoints = input 10 as "Stop Loss" targetPoints = input 20 as "Target" stop stopPoints points target targetPoints points