OPEN-SOURCE SCRIPT

Error Message -- Demo

By xxattaxx
This script is proof of concept to display an “error message” to provide user feedback when valid, but non-logical variables are input by the end user. In this example, the user enters a lower limit that is greater than the upper limit. The Pinescript user input box allows input types and min/max values, but it does not allow input conditions like (Upper > Lower) for each variable. This script evaluates the user input and determines if the variables are logical. If not, it will print an error box using the new Pinescript table function.

This is a demo only – there are no signals, strategies, or alerts. Hopefully, some pinescripters will find this idea useful and expand on the concept.

snapshot
User inputs an Upper Limit that is lower than the Lower Limit – error message displayed.

snapshot
User inputs logical Upper and Lower Limits (Upper Limit is greater than Lower Limit) – normal plots.
concepterrorcorrectingerrorsTrend Analysis
xxattaxx
USDT(ERC20):0x89c1ada92d53e88a06131a28693fd46101bdbecb
LTC:LWx9nAqbfZcWB5GBxUuBEpdBCFyVAmSFjm
ETH(ERC20):0x89c1ada92d53e88a06131a28693fd46101bdbecb
BTC:113pXq5Lxdp3UUgTpRng24sxX7YRE9dR61p

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer