user3125707
user3125707

Reputation: 409

How do you create a signal when close price is lower than previous close in pine script?

I would like to create a custom indicator in pine script on tradingview.com that would give me a signal on the chart telling me when the close price of a particular candle is lower than previous low. How do I go about scripting it?

Upvotes: 0

Views: 906

Answers (1)

alexgrover
alexgrover

Reputation: 1043

What you are asking in your title differ from what you are asking in the question description.

You can plot a shape when a condition is true using the plotshape function, in your case you can use:

plotshape(close<low[1],"Signal",shape.xcross)

Upvotes: 1

Related Questions