Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add popular inputs for indicators #623

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions links/common.pine.link
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ SMA40 = ta.sma(close, 40)
plot(SMA40, title='SMA40')
SMA50 = ta.sma(close, 50)
plot(SMA50, title='SMA50')
SMA60 = ta.sma(close, 60)
plot(SMA60, title='SMA60')
SMA75 = ta.sma(close, 75)
plot(SMA75, title='SMA75')
SMA100 = ta.sma(close, 100)
Expand Down Expand Up @@ -66,18 +68,26 @@ EMA12 = ta.ema(close, 12)
plot(EMA12, title='EMA12')
EMA13 = ta.ema(close, 13)
plot(EMA13, title='EMA13')
EMA15 = ta.ema(close, 15)
plot(EMA15, title='EMA15')
EMA20 = ta.ema(close, 20)
plot(EMA20, title='EMA20')
EMA21 = ta.ema(close, 21)
plot(EMA21, title='EMA21')
EMA25 = ta.ema(close, 25)
plot(EMA25, title='EMA25')
EMA26 = ta.ema(close, 26)
plot(EMA26, title='EMA26')
EMA30 = ta.ema(close, 30)
plot(EMA30, title='EMA30')
EMA34 = ta.ema(close, 34)
plot(EMA34, title='EMA34')
EMA40 = ta.ema(close, 40)
plot(EMA40, title='EMA40')
EMA50 = ta.ema(close, 50)
plot(EMA50, title='EMA50')
EMA55 = ta.ema(close, 55)
plot(EMA55, title='EMA55')
EMA75 = ta.ema(close, 75)
plot(EMA75, title='EMA75')
EMA100 = ta.ema(close, 100)
Expand Down Expand Up @@ -112,9 +122,15 @@ plot(RSI7[1], title='RSI7[1]')
RSI9 = ta.rsi(close, 9)
plot(RSI9, title='RSI9')
plot(RSI9[1], title='RSI9[1]')
RSI10 = ta.rsi(close, 10)
plot(RSI10, title='RSI10')
plot(RSI10[1], title='RSI10[1]')
RSI21 = ta.rsi(close, 21)
plot(RSI21, title='RSI21')
plot(RSI21[1], title='RSI21[1]')
RSI30 = ta.rsi(close, 30)
plot(RSI30, title='RSI30')
plot(RSI30[1], title='RSI30[1]')

// study(title="Average True Range", shorttitle="ATR", overlay=false)
ATR = ta.rma(ta.tr(true), 14)
Expand Down Expand Up @@ -216,6 +232,15 @@ plot(dStoch_14_1_3, title='Stoch.D_14_1_3')
plot(kStoch_14_1_3[1], title='Stoch.K[1]_14_1_3')
plot(dStoch_14_1_3[1], title='Stoch.D[1]_14_1_3')

lengthStoch := 8
smoothKStoch := 3
kStoch := ta.sma(ta.stoch(close, high, low, lengthStoch), smoothKStoch)
dStoch := ta.sma(kStoch, smoothDStoch)
plot(kStoch, title='Stoch.K_8_3_3')
plot(dStoch, title='Stoch.D_8_3_3')
plot(kStoch[1], title='Stoch8.K[1]_8_3_3')
plot(dStoch[1], title='Stoch8.D[1]_8_3_3')

// average volume
AvgVol = ta.sma(volume, 10)
plot(AvgVol, title='average_volume_10d_calc')
Expand All @@ -238,11 +263,18 @@ plot(donchUpper, title='DonchCh20.Upper')
plot(math.avg(donchUpper, donchLower), title='DonchCh20.Middle')

// Hull Moving Average
hullMALength = 9
hullMA_n2ma = 2 * ta.wma(close, hullMALength / 2)
hullMA_nma = ta.wma(close, hullMALength)
HullMA9 = ta.wma(hullMA_n2ma - hullMA_nma, math.floor(math.sqrt(hullMALength)))
hullMovingAverage(lenght) =>
hullMA_n2ma = 2 * ta.wma(close, lenght / 2)
hullMA_nma = ta.wma(close, lenght)
HullMA = ta.wma(hullMA_n2ma - hullMA_nma, math.floor(math.sqrt(lenght)))
HullMA

HullMA9 = hullMovingAverage(9)
plot(HullMA9, title='HullMA9')
HullMA20 = hullMovingAverage(20)
plot(HullMA20, title='HullMA20')
HullMA200 = hullMovingAverage(200)
plot(HullMA200, title='HullMA200')

// Awesome Oscillator
AO = ta.sma(hl2, 5) - ta.sma(hl2, 34)
Expand Down
642 changes: 381 additions & 261 deletions scanner.data.coin.json

Large diffs are not rendered by default.

648 changes: 384 additions & 264 deletions scanner.data.crypto.json

Large diffs are not rendered by default.

644 changes: 382 additions & 262 deletions scanner.data.futures.json

Large diffs are not rendered by default.

716 changes: 418 additions & 298 deletions scanner.data.json

Large diffs are not rendered by default.

524 changes: 322 additions & 202 deletions scanner.data.simple.5.json

Large diffs are not rendered by default.

540 changes: 330 additions & 210 deletions scanner.data.simple.coin.5.json

Large diffs are not rendered by default.

522 changes: 321 additions & 201 deletions scanner.data.simple.coin.json

Large diffs are not rendered by default.

542 changes: 331 additions & 211 deletions scanner.data.simple.crypto.5.json

Large diffs are not rendered by default.

526 changes: 323 additions & 203 deletions scanner.data.simple.crypto.json

Large diffs are not rendered by default.

522 changes: 321 additions & 201 deletions scanner.data.simple.json

Large diffs are not rendered by default.

Loading