How Can I Set SL and TP?


This Content is from Stack Overflow. Question asked by Mohammad Hasanpoor

i have strategy for entry and my stop loss is low of before candle.
and my tp is R/R 3 that it set according to Stoploss.

i wrote code but it not work.

strategy.entry(“Long Position”,strategy.long,when = LongEntry)
strategy.exit(“Exit Long” , from_entry = “Long Position” , stop = low[1] , profit = 3*low[1] )

what is problem?


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?