Skip to content

Commit 4740622

Browse files
authored
Update README.md
1 parent b4a789c commit 4740622

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

faq_and_code/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,13 +2137,23 @@ This script shows how to organize your inputs using the following tricks:
21372137
- Create separators using boolean checkboxes. Make their default value `true` so users are less prone to trying them out to see what they do, as they will most often do nothing. If your separators actually do something, make this clear in their wording.
21382138
- Indent sub-sections using Unicode white space characters. Choose one that shows up in the Editor as a visible character. We like to use the Em space (``): 8195 (0x2003).
21392139

2140-
Notes:
2140+
**Notes**
21412141
- We cannot indent checkboxes, so your sections will look cleaner if you use `input()`'s `options` parameter to provide selections via dropdowns rather than checkboxes.
21422142
- For separators to align neatly at the end of the dialog box, start by creating the longest input `title` you will be using, as it determines the width of db. This way you will avoid the tedious task or re-balancing the line characters on each side of your separator's name because of changes in the db's width when you add an input with a `title` longer than previous ones.
21432143
- If your longest input title turns out to be shorter than you had first planned and you want to avoid re-balancing separators, you can use Unicode white space to artificially make it longer, as we demonstrate for input `i_4` in our code example.
21442144
- Use ASCII characters 205 or 196 for continuous separator lines. The dash (ASCII 45) or Em dash (ASCII 151) do not join properly; they are thus less visually appealing.
21452145
- For better visual effect, ensure all you separator titles are centered vertically throughout all your Inputs. This requires trial and error, as the MS Trebuchet font used for TV text is proportionnally spaced.
21462146

2147+
**Tips**
2148+
- Your script's plots and inputs constitute their user interface. Inputs thus play a key role in the user experience. The more options you provide, the more important the design of your *Inputs* dialog box becomes, especially when users don't read script descritpions or if your description is lacking.
2149+
- Design the sequence of inputs with the user in mind—not by using the order in which they are used in your calculations. Place the most important/frequent selections at the top and test user travel down your list of inputs.
2150+
- Never use two checkboxes for mutually exclusive selections. Use dropdowns instead; they allow you to include as many useful options as you see fit.
2151+
- Do not be stingy when naming option selections. The dropdown widget can accommodate long strings.
2152+
- Remember not to use ampersands in `option` arguments, as your boolean expressions will not work with them.
2153+
- Choose your default values wisely.
2154+
- Provide adequate `min` and `max` values for numeric values, selecting the proper *float* or *int* type.
2155+
- When needed, customize `step` values to the particular use of each inputs.
2156+
21472157
```js
21482158
//@version=4
21492159
study("")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy