hkty2746
Pine Script Scholar
Pine Script Scholar
Posts: 3
Joined: March 7th, 2022

How to code for ADX above a certain number?

Hello all. How do I code for ADX above the user inputs selected number?

For example, user selects 25 then I want buysignal to be ADX > than 25.

There is an indicator I use that has user inputs of "ADX Smoothing", "DI Length" and "Trend Ready Limit". I'm trying to figure out how to do the same thing.

processingclouds
Pine Script Master
Pine Script Master
Posts: 115
Joined: January 30th, 2022

Re: How to code for ADX above a certain number?

Well if you are mentioning your indicator and need specific help on it, you should put the code in the question in code block.

What i can understand is, you want to get a user input and give signal when ADX value is above that.



You can have something like:
userInput = input.float(defval=25.0)
if ADX > userInput
strategy.enter(............

Return to “Pine Script Q&A”