简体   繁体   中英

How to set stop loss dynamically below a candle pinescript

How do I set stop loss at the hign/low of an entry candle? The value required for loss parameter is in ticks. Low and high give the price of the instrument (market).

You can use the stop argument which requires a price value.

stop (series int/float) An optional parameter. Stop loss (requires a specific price). If it is specified, a stop order is placed to exit market position at the specified price (or worse). Priority of the parameter 'stop' is higher than priority of the parameter 'loss' ('stop' is used instead of 'loss', if its value is not 'NaN'). The default value is 'NaN'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM