Bishnu Paudel
Bishnu Paudel

Reputation: 2079

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).

Upvotes: 0

Views: 92

Answers (1)

vitruvius
vitruvius

Reputation: 21121

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'.

Upvotes: 0

Related Questions