1

Hi all: ) I'm struggling with making different sell places In Pine Script and moving stop loss as I take profit. I dont want it to be percent wise. I want to decide the top levels, as a risk to reward ratio thing with steps. I found this Pine Script (TradingView) - How to move a Stop Loss to the Take Profit level but its percentage based. and I tried to modify it. nothing good came of it.

I just need something simple like

if current_price > 1takeprofit (sell)

else if current_price > secondprofit level (sell more)

else if current_price > last profit (sell the rest)

I guess the problem is that in the back test I can only get open high low and close So I can for example use the current_price = close or high I guess.

would it make sense do something like

if high > 1takeprofit (sell)

or am I missing something basic. Thanks sorry for my noob question.

0 Answers0