Skip to content

Commit

Permalink
HBS-0: upd pince scripts from nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
stimofeev-tv committed Feb 16, 2024
1 parent 86d77d9 commit e2db62f
Show file tree
Hide file tree
Showing 16 changed files with 2,381 additions and 2,151 deletions.
16 changes: 13 additions & 3 deletions links/common.pine.link
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ plot(RSI21, title='RSI21')
plot(RSI21[1], title='RSI21[1]')

// study(title="Average True Range", shorttitle="ATR", overlay=false)
plot(ta.rma(ta.tr(true), 14), title='ATR')
ATR = ta.rma(ta.tr(true), 14)
plot(ATR, title='ATR')

// Average True Range Percent (ATRP)
plot(ATR / close * 100, title='ATRP')

// study("Average Directional Index", shorttitle="ADX")
dirmov(len) =>
Expand Down Expand Up @@ -346,8 +350,14 @@ plot(IC_Lead2_20_60_120_30[IC_displacement], title='Ichimoku.Lead2_20_60_120_30'
VWMA = ta.vwma(close, 20)
plot(VWMA, title='VWMA')

// Average Day Range
plot(ta.sma(high - low, 14), title='ADR')
// Average Day Range (ADR)
smaHigh = ta.sma(high, 14)
smaLow = ta.sma(low, 14)
ADR = smaHigh - smaLow
plot(ADR, title='ADR')

// Average Day Range Percent (ADRP)
plot(ADR / close * 100, title='ADRP')

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
PriceAvg = EMA50
Expand Down
3 changes: 3 additions & 0 deletions links/high_and_low.pine.link
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ fastSearchN(_xs, x, maxbarsback) => // xs - sorted, ascending
else
break
mid
years10 = (365 * 4 + 366) * 2
years10_ago = timenow - 1000 * 60 * 60 * 24 * years10
countOfBars10YearAgo = fastSearchN(time, years10_ago, years10)
years5 = 365 * 4 + 366
years5_ago = timenow - 1000 * 60 * 60 * 24 * years5
countOfBars5YearAgo = fastSearchN(time, years5_ago, years5)
Expand Down
2 changes: 1 addition & 1 deletion links/performance_market_cap.pine.link
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fundPerfYTD() =>
max_bars_back(close, 2*oneYear)

lastI = 0
for i = 0 to bar_index
for i = 1 to bar_index
if year(time[i], syminfo.timezone) < year
lastI := i - 1
break
Expand Down
3 changes: 2 additions & 1 deletion links/performance_stocks.pine.link
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Performance for stocks
// Perf.<W | 1M | 3M | 6M | Y | 5Y | YTD>
// Perf.<W | 1M | 3M | 6M | Y | 5Y | 10Y | YTD>
oneYear = 365
oneYearAgo = timenow - 1000 * 60 * 60 * 24 * oneYear
barsCountOneYear = fastSearchN(time, oneYearAgo, oneYear)
Expand All @@ -12,4 +12,5 @@ plot(rr(countOfBars6MonthAgo, month6), title='Perf.6M')
plot(rr(barsCountOneYear, oneYear), title='Perf.Y')
plot(rr(countOfBars3YearAgo, years3), title='Perf.3Y')
plot(rr(countOfBars5YearAgo, years5), title='Perf.5Y')
plot(rr(countOfBars10YearAgo, years10), title='Perf.10Y')
plot(perfYTD, title='Perf.YTD')
428 changes: 226 additions & 202 deletions scanner.data.bonds.json

Large diffs are not rendered by default.

428 changes: 222 additions & 206 deletions scanner.data.coin.json

Large diffs are not rendered by default.

432 changes: 224 additions & 208 deletions scanner.data.crypto.json

Large diffs are not rendered by default.

418 changes: 221 additions & 197 deletions scanner.data.futures.json

Large diffs are not rendered by default.

484 changes: 254 additions & 230 deletions scanner.data.json

Large diffs are not rendered by default.

326 changes: 171 additions & 155 deletions scanner.data.simple.5.json

Large diffs are not rendered by default.

330 changes: 173 additions & 157 deletions scanner.data.simple.bonds.json

Large diffs are not rendered by default.

342 changes: 179 additions & 163 deletions scanner.data.simple.coin.5.json

Large diffs are not rendered by default.

324 changes: 170 additions & 154 deletions scanner.data.simple.coin.json

Large diffs are not rendered by default.

344 changes: 180 additions & 164 deletions scanner.data.simple.crypto.5.json

Large diffs are not rendered by default.

328 changes: 172 additions & 156 deletions scanner.data.simple.crypto.json

Large diffs are not rendered by default.

324 changes: 170 additions & 154 deletions scanner.data.simple.json

Large diffs are not rendered by default.

0 comments on commit e2db62f

Please sign in to comment.