Page 1 of 1

How to code for ADX above a certain number?

Posted: Mon Mar 07, 2022 10:41 pm
by hkty2746
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.

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

Posted: Wed Mar 09, 2022 9:27 am
by processingclouds
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(............