Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 036b435

Browse files
committed
Fix and release v 0.1.5
1 parent 2236623 commit 036b435

File tree

4 files changed

+31
-23
lines changed

4 files changed

+31
-23
lines changed

Diff for: language-configuration.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
["(", ")"],
2525
["\"", "\""],
2626
["'", "'"]
27-
]
27+
]
2828
// "wordPattern": [],
2929

3030
// "indentationRules": {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pine-script-syntax-highlighting",
33
"displayName": "Pine Script Syntax Highlighting",
44
"description": "Syntax Highlighting for Pine Script",
5-
"version": "0.1.4",
5+
"version": "0.1.5",
66
"publisher": "leifcr",
77
"license": "MIT",
88
"engines": {

Diff for: syntaxes/pine.tmLanguage.json

+21-21
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"match": "\\\\.",
4545
"name": "constant.character.escaped.pine"
4646
}
47-
]
47+
]
4848
},
4949
{
5050
"begin": "'",
5151
"beginCaptures": {
52-
"1": {
52+
"1": {
5353
"name": "punctuation.definition.string.begin.pine"
5454
}
5555
},
@@ -65,57 +65,57 @@
6565
"match": "\\\\.",
6666
"name": "constant.character.escaped.pine"
6767
}
68-
]
68+
]
6969
}
7070
]
7171
},
7272
"functions": {
7373
"patterns": [
7474
{
75-
"match": "\\b(abs|acos|alertcondition|alma|asin|atan|atr|avg|barcolor|barssince|bb|bbw|bgcolor|bool|cci|ceil|change|cmo|cog|color|color\\.new|correlation|cos|cross|crossover|crossunder|cum|dayofmonth|dayofweek|dev|dmi|ema|exp|falling|fill|financial|fixnan|float|floor|heikinashi|highest|highestbars|hline|hma|hour|iff|input|int|kagi|kc|kcw|label|line|linebreak|linreg|log|log10|lowest|lowestbars|macd|max|max_bars_back|mfi|min|minute|mom|month|na|nz|offset|percentile_linear_interpolation|percentile_nearest_rank|pivothigh|pivotlow|plot|plotarrow|plotbar|plotcandle|plotchar|plotshape|pointfigure|pow|quandl|renko|rising|rma|roc|round|rsi|sar|second|security|sign|sin|sma|sqrt|stdev|stoch|str\\.replace_all|strategy|string|study|sum|supertrend|swma|tan|tickerid|time|timestamp|tostring|tr|tsi|valuewhen|variance|vwma|weekofyear|wma|wpr|year)(?=\\()",
75+
"match": "\\b(abs|acos|alertcondition|alma|asin|atan|atr|avg|bar(color|since)|bb|bbw|bgcolor|bool|cci|ceil|change|cmo|cog|color|color\\.new|correlation|cos|cross|crossover|crossunder|cum|dayofmonth|dayofweek|dev|dmi|ema|exp|falling|fill|financial|fixnan|float|floor|heikinashi|highest|highestbars|hline|hma|hour|iff|input|int|kagi|kc|kcw|label|line|linebreak|linreg|log|log10|lowest|lowestbars|macd|max|max_bars_back|mfi|min|minute|mom|month|na|nz|offset|percentile_linear_interpolation|percentile_nearest_rank|pivothigh|pivotlow|plot|plotarrow|plotbar|plotcandle|plotchar|plotshape|pointfigure|pow|quandl|renko|rising|rma|roc|round|rsi|sar|second|security|sign|sin|sma|sqrt|stdev|stoch|str\\.replace_all|strategy|string|study|sum|supertrend|swma|tan|tickerid|time|timestamp|tostring|tr|tsi|valuewhen|variance|vwma|weekofyear|wma|wpr|year)(?=\\()",
7676
"captures": {
77-
"1": {
78-
"name": "support.function.pine"
77+
"1": {
78+
"name": "support.function.pine"
7979
}
8080
}
8181
},
8282
{
8383
"match": "\\barray\\.(avg|clear|concat|copy|covariance|fill|get|includes|indexof|insert|lastindexof|max|median|min|mode|new_bool|new_color|new_float|new_int|pop|push|remove|reverse|set|shift|size|slice|sort|standardize|stdev|sum|unshift|variance)(?=\\()",
8484
"captures": {
85-
"1": {
86-
"name": "support.function.pine"
85+
"1": {
86+
"name": "support.function.pine"
8787
}
8888
}
8989
},
9090
{
9191
"match": "\\blabel\\.(delete|get_text|get_x|get_y|new|set_color|set_size|set_text|set_textalign|set_textcolor|set_tooltip|set_x|set_xloc|set_xy|set_y|set_yloc)(?=\\()",
9292
"captures": {
93-
"1": {
94-
"name": "support.function.pine"
93+
"1": {
94+
"name": "support.function.pine"
9595
}
9696
}
9797
},
9898
{
9999
"match": "\\bline\\.(delete|get_price|get_x1|get_x2|get_y1|get_y2|new|set_color|set_extend|set_style|set_width|set_x1|set_x2|set_xloc|set_xy1|set_xy2|set_y1|set_y2)(?=\\()",
100100
"captures": {
101-
"1": {
102-
"name": "support.function.pine"
101+
"1": {
102+
"name": "support.function.pine"
103103
}
104104
}
105105
},
106106
{
107107
"match": "\\bstrategy\\.(cancel|cancel_all|close|close_all|entry|exit|order)(?=\\()",
108108
"captures": {
109-
"1": {
110-
"name": "support.function.pine"
109+
"1": {
110+
"name": "support.function.pine"
111111
}
112112
}
113113
},
114114
{
115115
"match": "\\bstrategy\\.risk\\.(allow_entry_in|max_cons_loss_days|max_drawdown|max_intraday_filled_orders|max_intraday_loss|max_position_size)(?=\\()",
116116
"captures": {
117-
"1": {
118-
"name": "support.function.pine"
117+
"1": {
118+
"name": "support.function.pine"
119119
}
120120
}
121121
},
@@ -126,8 +126,8 @@
126126
{
127127
"match": "([a-zA-Z_][a-zA-Z0-9_]*)\\(.*\\)\\s(=>)\\s",
128128
"captures": {
129-
"1": {
130-
"name": "support.function.pine"
129+
"1": {
130+
"name": "support.function.pine"
131131
},
132132
"2": {
133133
"name": "keyword.operator.assignment.pine"
@@ -143,7 +143,7 @@
143143
"name": "constant.language.pine"
144144
},
145145
{
146-
"match": "\\b(accdist|bar_index|close|dayofmonth|dayofweek|high|hl2|hlc3|hour|iii|low|minute|month|na|nvi|obv|ohlc4|open|pvi|pvt|second|time|time_close|timenow|tr|volume|vwap|wad|weekofyear|wvad|year|)\\b",
146+
"match": "\\b(accdist|bar_index|close|dayofmonth|dayofweek|high|hl2|hlc3|hour|iii|low|minute|month|na|nvi|obv|ohlc4|open|pvi|pvt|second|time|time_close|timenow|tr|volume|vwap|wad|weekofyear|wvad|year)\\b",
147147
"name": "constant.language.pine"
148148
},
149149
{
@@ -273,7 +273,7 @@
273273
{
274274
"match": "\\b([0-9]+)\\b",
275275
"name": "constant.numeric.pine"
276-
}
276+
}
277277
]
278278
},
279279
"operators": {
@@ -297,7 +297,7 @@
297297
{
298298
"match": "=",
299299
"name": "keyword.operator.assignment.pine"
300-
}
300+
}
301301
]
302302
},
303303
"keywords": {

Diff for: test.pine

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
study("MACD")
2+
fast = 12, slow = 26
3+
fastMA = ema(close, fast)
4+
slowMA = ema(close, slow)
5+
macd = fastMA - slowMA
6+
signal = sma(macd, 9)
7+
plot(macd, color=color.blue)
8+
plot(signal, color=color.orange)

0 commit comments

Comments
 (0)