Skip to content

Commit a031cff

Browse files
authored
Merge pull request #10 from LucFF/master
Fixed bulleted lists re writing guidelines
2 parents 4e0eb80 + 5c1482b commit a031cff

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<div align="center"><font size="+1"><strong>Want to learn proper Pine coding style?<br></strong></font> Read our <a href="http://www.pinecoders.com/coding_conventions">Pine Coding Conventions</a>.</div>
1111

12-
<div align="center"><font size="+1"><strong>Looking for Pine-related tools and resources?<br></strong></font> Read our <a href="http://www.pinecoders.com/resources">Pine Resources</a>.</div>
12+
<div align="center"><font size="+1"><strong>Looking for Pine-related tools or resources?<br></strong></font> Use our list of <a href="http://www.pinecoders.com/resources">Pine Resources</a>.</div>
1313

1414
---
1515

faq_and_code/README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ If you need to define up and down candles, then make sure one of those definitio
4242
```
4343
upCandle = close >= open
4444
downCandle = close < open
45-
4645
```
4746

4847
**[Back to top](#table-of-contents)**
@@ -196,9 +195,9 @@ The PineCoders [Backtesting-Trading Engine](https://www.tradingview.com/script/d
196195

197196
### Can my strategy generate orders through TV-supported brokers?
198197
No. The brokers can only be used for manual trading. Currently, the only way to automate trading using TradingView is to:
199-
- Create an indicator (a.k.a. *study*) from your strategy,
200-
- Insert `alertcondition()` calls in your indicator using your buy/sell conditions,
201-
- Create separate Buy and Sell alerts from TV Web,
198+
- Create an indicator (a.k.a. *study*) from your strategy.
199+
- Insert `alertcondition()` calls in your indicator using your buy/sell conditions.
200+
- Create separate Buy and Sell alerts from TV Web.
202201
- Link those alerts to a third-party app/bot which will relay orders to exchanges or brokers. See the [Automation](http://pinecoders.com/resources#automation) section of our Resources document.
203202

204203
**[Back to top](#table-of-contents)**
@@ -238,12 +237,12 @@ When you need to create multiple alerts you can repeat the method above for ever
238237
When more than one condition can trigger a single alert, you will most probably need to have visual cues for each condition so that when users bring up a chart on which an alert triggered they can figure out which condition caused the alert to trigger. This is a method that allows users of your script to customize the alert to their needs.
239238

240239
When TradingView creates an alert, it saves a snapshot of the environment that will enable the alert to run on the servers. The elements saved with an alert are:
241-
- Current symbol,
242-
- Current time frame,
243-
- State of the script's *Inputs* selections,
244-
- Current version of the script. Subsequent updates to the script’s code will not affect the alerts created with prior versions.
240+
- Current symbol
241+
- Current time frame
242+
- State of the script's *Inputs* selections
243+
- Current version of the script. Subsequent updates to the script’s code will not affect the alerts created with prior versions
245244

246-
> Note that while alert condition code will compile in strategy scripts, they are only functional in studies.
245+
> Note that while alert condition code will compile in strategy scripts, alerts are only functional in studies.
247246
248247
### I have a custom script that generates alerts. How do I run it on many symbols?
249248
You need to create a separate alert for each symbol. There is currently no way to create an alert for all the symbols in a watchlist or for the Screener.
@@ -254,8 +253,8 @@ If one of the generic indicators supplied with the Screener suits your needs and
254253
The string may vary conditionally, but it must be of type *const string*, which implies it **must be known at compile time**.
255254

256255
This requirement entails that neither the condition used to build the string nor values used to calculate the string itself can depend on:
257-
- Variables that are only known with the current chart or interval information such as `syminfo.ticker` or `timeframe.period`;
258-
- Calculations with results that can only be determined at runtime, e.g.,: `close > open`, `rsi(14)`, etc.;
256+
- Variables that are only known with the current chart or interval information such as `syminfo.ticker` or `timeframe.period`.
257+
- Calculations with results that can only be determined at runtime, e.g.,: `close > open`, `rsi(14)`, etc.
259258
- Calculations with results known at compile time, but of a type that cannot be cast to *const string*, such as `tostring()`.
260259

261260
The first step when you are in doubt as to what can be used as an argument to a built-in function such as [`alertcondition()`](https://www.tradingview.com/pine-script-reference/v4/#fun_alertcondition) is to look up the Reference Manual:
@@ -269,8 +268,8 @@ The next step is to consult the automatic type casting rules diagram in the User
269268
![.](TypeCasting_ConstString.png "Type Casting")
270269

271270
The diagram shows you where the *const string* type is situated in the casting rules, which allows you to determine:
272-
- The types that will be allowed because they are above *const string*, meaning they can be cast to a *const string*;
273-
- The types that will **not** be allowed because they are below *const string*, meaning they **cannot** be cast to a *const string*;
271+
- The types that will be allowed because they are above *const string*, meaning they can be cast to a *const string*.
272+
- The types that will **not** be allowed because they are below *const string*, meaning they **cannot** be cast to a *const string*.
274273

275274
This code shows examples that work and don't work:
276275
```

writing_guidelines.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
# Writing guidelines for PineCoders Web content
22

3-
## Annotations
3+
## Terminology
4+
5+
### Annotations
46
Don't use the term *annotation*, as it most probably will be phased out. We use *function* for everything that was called an annotation, except for `study()` and `strategy()`, for which we use the term *declaration statement*.
57

6-
## Realtime
8+
### Realtime
79
Use *realtime* rather than *real time* or *real-time*.
810

9-
## Script
11+
### Script
1012
*Script* is useful when referring to both *indicators* and *strategies*.
1113

12-
## Study vs Indicator
14+
### Study vs Indicator
1315
Use *indicator* whenever you can, except when referring to the `study()` declaration statement itself.
1416

1517
Example:
1618
> The first line of an indicator should be the `study()` declaration statement.
1719
1820
Note than *indicator* is understood to include only *studies*. Pine strategies should be referred to as *strategies*—not *indicators*.
1921

22+
## Style
23+
24+
### Bulleted or enumerated lists punctuation
25+
Capitalize the first word of each element.
26+
27+
List elements use no ending punctuation when they are not a sentence. This also applies to the last element in the list.<br>
28+
Use an ending period on all list elements when they are sentences, or when the majority is.
29+
30+
### Capitalization of titles
31+
We follow the TradingView standard of capitalizing only the **first word** of titles.

0 commit comments

Comments
 (0)