Created
October 31, 2022 17:17
-
-
Save kyawswarthwin/69d29420cb70eaab619daae24f00c316 to your computer and use it in GitHub Desktop.
TradingView Indicator Title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const INDICATORS = [ | |
'Recommend.Other', | |
'Recommend.All', | |
'Recommend.MA', | |
'RSI', | |
'RSI[1]', | |
'Stoch.K', | |
'Stoch.D', | |
'Stoch.K[1]', | |
'Stoch.D[1]', | |
'CCI20', | |
'CCI20[1]', | |
'ADX', | |
'ADX+DI', | |
'ADX-DI', | |
'ADX+DI[1]', | |
'ADX-DI[1]', | |
'AO', | |
'AO[1]', | |
'AO[2]', | |
'Mom', | |
'Mom[1]', | |
'MACD.macd', | |
'MACD.signal', | |
'Rec.Stoch.RSI', | |
'Stoch.RSI.K', | |
'Rec.WR', | |
'W.R', | |
'Rec.BBPower', | |
'BBPower', | |
'Rec.UO', | |
'UO', | |
'close', | |
'EMA10', | |
'SMA10', | |
'EMA20', | |
'SMA20', | |
'EMA30', | |
'SMA30', | |
'EMA50', | |
'SMA50', | |
'EMA100', | |
'SMA100', | |
'EMA200', | |
'SMA200', | |
'Rec.Ichimoku', | |
'Ichimoku.BLine', | |
'Rec.VWMA', | |
'VWMA', | |
'Rec.HullMA9', | |
'HullMA9', | |
'Pivot.M.Classic.S3', | |
'Pivot.M.Classic.S2', | |
'Pivot.M.Classic.S1', | |
'Pivot.M.Classic.Middle', | |
'Pivot.M.Classic.R1', | |
'Pivot.M.Classic.R2', | |
'Pivot.M.Classic.R3', | |
'Pivot.M.Fibonacci.S3', | |
'Pivot.M.Fibonacci.S2', | |
'Pivot.M.Fibonacci.S1', | |
'Pivot.M.Fibonacci.Middle', | |
'Pivot.M.Fibonacci.R1', | |
'Pivot.M.Fibonacci.R2', | |
'Pivot.M.Fibonacci.R3', | |
'Pivot.M.Camarilla.S3', | |
'Pivot.M.Camarilla.S2', | |
'Pivot.M.Camarilla.S1', | |
'Pivot.M.Camarilla.Middle', | |
'Pivot.M.Camarilla.R1', | |
'Pivot.M.Camarilla.R2', | |
'Pivot.M.Camarilla.R3', | |
'Pivot.M.Woodie.S3', | |
'Pivot.M.Woodie.S2', | |
'Pivot.M.Woodie.S1', | |
'Pivot.M.Woodie.Middle', | |
'Pivot.M.Woodie.R1', | |
'Pivot.M.Woodie.R2', | |
'Pivot.M.Woodie.R3', | |
'Pivot.M.Demark.S1', | |
'Pivot.M.Demark.Middle', | |
'Pivot.M.Demark.R1' | |
]; | |
// https://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format | |
String.prototype.format = | |
String.prototype.format || | |
function () { | |
'use strict'; | |
var str = this.toString(); | |
if (arguments.length) { | |
var t = typeof arguments[0]; | |
var key; | |
var args = | |
'string' === t || 'number' === t | |
? Array.prototype.slice.call(arguments) | |
: arguments[0]; | |
for (key in args) { | |
str = str.replace(new RegExp('\\{' + key + '\\}', 'gi'), args[key]); | |
} | |
} | |
return str; | |
}; | |
const a = { | |
name: ['Ticker', 'Ticker'], | |
description: ['Description', 'Description'], | |
country: ['Country', 'Country'], | |
type: ['Symbol Type', 'Symbol Type'], | |
after_tax_margin: ['Net Margin (TTM)', 'Net Margin'], | |
average_volume: ['Average Volume (10 day)', 'Avg Vol (10)'], | |
average_volume_30d_calc: ['Average Volume (30 day)', 'Avg Vol (30)'], | |
average_volume_60d_calc: ['Average Volume (60 day)', 'Avg Vol (60)'], | |
average_volume_90d_calc: ['Average Volume (90 day)', 'Avg Vol (90)'], | |
basic_eps_net_income: ['Basic EPS (FY)', 'EPS (FY)'], | |
beta_1_year: ['1-Year Beta', '1-Y Beta'], | |
beta_3_year: ['Beta - 3 Year', 'Beta 3Y'], | |
beta_5_year: ['Beta - 5 Year', 'Beta 5Y'], | |
candlestick: [ | |
('Pattern', { context: 'candlestick_pattern' }), | |
('Pattern', { context: 'candlestick_pattern' }) | |
], | |
current_ratio: ['Current Ratio (MRQ)', 'Current Ratio'], | |
debt_to_assets: ['Debt to Assets', 'Debt to Assets'], | |
debt_to_equity: ['Debt to Equity Ratio (MRQ)', 'DEBT/EQUITY'], | |
dividends_paid: ['Dividends Paid (FY)', 'Div Paid'], | |
dividends_per_share_fq: ['Dividends per Share (MRQ)', 'Div per Share (MRQ)'], | |
dividends_yield: ['Dividend Yield Forward', 'Div Yield FWD'], | |
dividend_yield_recent: ['Dividend Yield Forward', 'Div Yield FWD'], | |
dps_common_stock_prim_issue_fy: [ | |
'Dividends per Share (FY)', | |
'Div per Share (FY)' | |
], | |
earnings_per_share_basic_ttm: ['Basic EPS (TTM)', 'EPS (TTM)'], | |
earnings_per_share_diluted_ttm: ['EPS Diluted (TTM)', 'EPS Diluted (TTM)'], | |
earnings_per_share_forecast_next_fq: ['EPS Forecast (FQ)', 'EPS Forecast'], | |
earnings_per_share_fq: ['EPS Diluted (MRQ)', 'EPS Diluted (MRQ)'], | |
earnings_release_date: ['Recent Earnings Date', 'Recent Earnings Date'], | |
earnings_release_next_date: [ | |
'Upcoming Earnings Date', | |
'Upcoming Earnings Date' | |
], | |
ebitda: ['EBITDA (TTM)', 'EBITDA'], | |
enterprise_value_ebitda_ttm: ['Enterprise Value/EBITDA (TTM)', 'EV/EBITDA'], | |
enterprise_value_fq: ['Enterprise Value (MRQ)', 'EV'], | |
exchange: ['Exchange', 'Exchange'], | |
gross_margin: ['Gross Margin (TTM)', 'Gross Margin'], | |
gross_profit: ['Gross Profit (FY)', 'Gross Profit (FY)'], | |
gross_profit_fq: ['Gross Profit (MRQ)', 'Gross Profit (MRQ)'], | |
index: ['Index', 'Index'], | |
industry: ['Industry', 'Industry'], | |
last_annual_eps: ['EPS Diluted (FY)', 'EPS Diluted (FY)'], | |
last_annual_revenue: ['Last Year Revenue (FY)', 'Annual Rev'], | |
long_term_capital: ['Capital Long Term', 'Capital Long Term'], | |
market_cap_basic: ['Market Capitalization', 'Mkt Cap'], | |
market_cap_calc: ['Market Capitalization', 'Mkt Cap'], | |
market_cap_diluted_calc: ['Fully Diluted Market Cap', 'FD Mkt Cap'], | |
net_debt: ['Net Debt (MRQ)', 'Net Debt'], | |
net_income: ['Net Income (FY)', 'Income'], | |
number_of_employees: ['Number of Employees', 'EMPLOYEES'], | |
number_of_shareholders: ['Number of Shareholders', 'Shareholders'], | |
open_price: ['Open Price', 'Open'], | |
operating_margin: ['Operating Margin (TTM)', 'Operating Margin'], | |
pre_tax_margin: ['Pretax Margin (TTM)', 'Pretax Margin'], | |
preferred_dividends: ['Dividends Preferred', 'Div Pref'], | |
prev_close_price: ['Previous Close Price', 'Prev'], | |
price_52_week_high: ['52 Week High', 'High 52W'], | |
price_52_week_low: ['52 Week Low', 'Low 52W'], | |
price_book_ratio: ['Price to Book (FY)', 'P/B (FY)'], | |
price_earnings_ttm: ['Price to Earnings Ratio (TTM)', 'P/E'], | |
price_percent_change_1_week: ['Price % Change 1 Week', 'Chng 1W'], | |
price_percent_change_4_week: ['Price % Change 4 Week', 'Chng 4W'], | |
price_percent_change_52_week: ['Price % Change 52 Week', 'Chng 52W'], | |
price_revenue_ttm: ['Price to Revenue Ratio (TTM)', 'Price/Rev'], | |
price_sales_ratio: ['Price to Sales (FY)', 'P/S'], | |
quick_ratio: ['Quick Ratio (MRQ)', 'Quick Ratio'], | |
return_of_invested_capital_percent_ttm: [ | |
'Return on Invested Capital % (TTM)', | |
'ROIC %' | |
], | |
return_on_assets: ['Return on Assets (TTM)', 'ROA'], | |
return_on_equity: ['Return on Equity (TTM)', 'ROE'], | |
return_on_invested_capital: ['Return on Invested Capital (TTM)', 'ROIC %'], | |
revenue_per_employee: ['Revenue per Employee (TTM)', 'Revenue per Employee'], | |
sector: ['Sector', 'Sector'], | |
submarket: ['Submarket', 'Submarket'], | |
is_primary: ['Primary Listing', 'Primary Listing'], | |
eps_surprise_fq: ['Surprise', 'Surprise'], | |
eps_surprise_percent_fq: ['Surprise %', 'Surprise %'], | |
total_assets: ['Total Assets (MRQ)', 'Assets'], | |
total_capital: ['Total Capital', 'Capital'], | |
total_current_assets: ['Total Current Assets (MRQ)', 'Current Assets'], | |
total_debt: ['Total Debt (MRQ)', 'Debt'], | |
total_revenue: ['Total Revenue (FY)', 'Revenue'], | |
total_liabilities_fy: ['Total Liabilities (FY)', 'Liabilities (FY)'], | |
total_liabilities_fq: ['Total Liabilities (MRQ)', 'Liabilities (MRQ)'], | |
total_shares_outstanding_fundamental: [ | |
'Total Shares Outstanding (MRQ)', | |
'Shares' | |
], | |
volume: ['Volume', 'Vol'], | |
relative_volume: ['Relative Volume', 'Relative Vol'], | |
relative_volume_at_time: ['Relative Volume at Time', 'Relative Vol at Time'], | |
change_abs: ['Change', 'Chg'], | |
change: ['Change %', 'Chg %'], | |
'change.1': [ | |
'Change {resolution}, %'.format({ | |
resolution: '1m' | |
}), | |
'{resolution} CHG %'.format({ resolution: '1m' }) | |
], | |
'change_abs.1': [ | |
'Change {resolution}'.format({ | |
resolution: '1m' | |
}), | |
'{resolution} CHG'.format({ resolution: '1m' }) | |
], | |
'change.5': [ | |
'Change {resolution}, %'.format({ | |
resolution: '5m' | |
}), | |
'{resolution} CHG %'.format({ resolution: '5m' }) | |
], | |
'change_abs.5': [ | |
'Change {resolution}'.format({ | |
resolution: '5m' | |
}), | |
'{resolution} CHG'.format({ resolution: '5m' }) | |
], | |
'change.15': [ | |
'Change {resolution}, %'.format({ | |
resolution: '15m' | |
}), | |
'{resolution} CHG %'.format({ resolution: '15m' }) | |
], | |
'change_abs.15': [ | |
'Change {resolution}'.format({ | |
resolution: '15m' | |
}), | |
'{resolution} CHG'.format({ resolution: '15m' }) | |
], | |
'change.60': [ | |
'Change {resolution}, %'.format({ | |
resolution: '1h' | |
}), | |
'{resolution} CHG %'.format({ resolution: '1h' }) | |
], | |
'change_abs.60': [ | |
'Change {resolution}'.format({ | |
resolution: '1h' | |
}), | |
'{resolution} CHG'.format({ resolution: '1h' }) | |
], | |
'change.240': [ | |
'Change {resolution}, %'.format({ | |
resolution: '4h' | |
}), | |
'{resolution} CHG %'.format({ resolution: '4h' }) | |
], | |
'change_abs.240': [ | |
'Change {resolution}'.format({ | |
resolution: '4h' | |
}), | |
'{resolution} CHG'.format({ resolution: '4h' }) | |
], | |
'change.1W': [ | |
'Change {resolution}, %'.format({ | |
resolution: '1W' | |
}), | |
'{resolution} CHG %'.format({ resolution: '1W' }) | |
], | |
'change_abs.1W': [ | |
'Change {resolution}'.format({ | |
resolution: '1W' | |
}), | |
'{resolution} CHG'.format({ resolution: '1W' }) | |
], | |
'change.1M': [ | |
'Change {resolution}, %'.format({ | |
resolution: '1M' | |
}), | |
'{resolution} CHG %'.format({ resolution: '1M' }) | |
], | |
'change_abs.1M': [ | |
'Change {resolution}'.format({ | |
resolution: '1M' | |
}), | |
'{resolution} CHG'.format({ resolution: '1M' }) | |
], | |
currency: ['Quote currency', 'Quote currency'], | |
pre_change: ['Pre-market Change %', 'Pre-market chg %'], | |
post_change: ['Post-market Change %', 'Post-market chg %'], | |
bid: ['Bid', 'Bid'], | |
ask: ['Ask', 'Ask'], | |
close: ['Close', 'Close'], | |
open: ['Open', 'Open'], | |
high: ['High', 'High'], | |
low: ['Low', 'Low'], | |
gap: ['Gap %', 'Gap %'], | |
price_earnings_to_growth_ttm: ['Price/Earnings/Growth (TTM)', 'PEG'], | |
price_sales: ['Price/Sales', 'Price/Sales'], | |
price_book_fq: ['Price to Book (MRQ)', 'P/B (MRQ)'], | |
price_free_cash_flow_ttm: [ | |
'Price to Free Cash Flow (TTM)', | |
'Price/Free Cash Flow' | |
], | |
float_shares_outstanding: ['Shares Float', 'Float'], | |
free_cash_flow: ['Free Cash Flow (TTM)', 'Free Cash Flow'], | |
total_shares_outstanding: ['Shares Outstanding', 'Shares Outstanding'], | |
total_shares_diluted: ['Total Coins', 'Total Coins'], | |
total_value_traded: ['Traded Volume', 'Traded Vol'], | |
change_from_open: ['Change from Open %', 'Chg from Open %'], | |
change_from_open_abs: ['Change from Open', 'Chg from Open'], | |
'Perf.W': ['Weekly Performance', 'Weekly Perf'], | |
'Perf.1M': ['Monthly Performance', 'Monthly Perf'], | |
'Perf.3M': ['3-Month Performance', '3-Month Perf'], | |
'Perf.6M': ['6-Month Performance', '6-Month Perf'], | |
'Perf.Y': ['Yearly Performance', 'Yearly Perf'], | |
'Perf.YTD': ['YTD Performance', 'YTD Perf'], | |
'Volatility.W': ['Volatility Week', 'Volatility W'], | |
'Volatility.M': ['Volatility Month', 'Volatility M'], | |
'Volatility.D': ['Volatility', 'Volatility'], | |
RSI: ['Relative Strength Index (14)', 'RSI14'], | |
RSI7: ['Relative Strength Index (7)', 'RSI7'], | |
ADX: ['Average Directional Index (14)', 'ADX'], | |
'ADX+DI': [ | |
'Positive Directional Indicator (14)', | |
('+DI', | |
{ | |
context: 'Positive_Directional_Indicator_short_title' | |
}) | |
], | |
'ADX-DI': [ | |
'Negative Directional Indicator (14)', | |
('-DI', | |
{ | |
context: 'Negative_Directional_Indicator_short_title' | |
}) | |
], | |
ATR: ['Average True Range (14)', 'ATR'], | |
Mom: ['Momentum (10)', 'MOM'], | |
'High.All': ['All Time High', 'All Time High'], | |
'Low.All': ['All Time Low', 'All Time Low'], | |
'High.6M': ['6-Month High', '6-Month High'], | |
'Low.6M': ['6-Month Low', '6-Month Low'], | |
'High.3M': ['3-Month High', '3-Month High'], | |
'Low.3M': ['3-Month Low', '3-Month Low'], | |
'High.1M': ['1-Month High', '1-Month High'], | |
'Low.1M': ['1-Month Low', '1-Month Low'], | |
EMA5: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '5' | |
}), | |
'EMA5' | |
], | |
EMA10: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '10' | |
}), | |
'EMA10' | |
], | |
EMA20: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '20' | |
}), | |
'EMA20' | |
], | |
EMA30: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '30' | |
}), | |
'EMA30' | |
], | |
EMA50: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '50' | |
}), | |
'EMA50' | |
], | |
EMA100: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '100' | |
}), | |
'EMA100' | |
], | |
EMA200: [ | |
'Exponential Moving Average ({number})'.format({ | |
number: '200' | |
}), | |
'EMA200' | |
], | |
SMA5: ['Simple Moving Average ({number})'.format({ number: '5' }), 'SMA5'], | |
SMA10: ['Simple Moving Average ({number})'.format({ number: '10' }), 'SMA10'], | |
SMA20: ['Simple Moving Average ({number})'.format({ number: '20' }), 'SMA20'], | |
SMA30: ['Simple Moving Average ({number})'.format({ number: '30' }), 'SMA30'], | |
SMA50: ['Simple Moving Average ({number})'.format({ number: '50' }), 'SMA50'], | |
SMA100: [ | |
'Simple Moving Average ({number})'.format({ | |
number: '100' | |
}), | |
'SMA100' | |
], | |
SMA200: [ | |
'Simple Moving Average ({number})'.format({ | |
number: '200' | |
}), | |
'SMA200' | |
], | |
'Stoch.K': ['Stochastic %K (14, 3, 3)', 'Stoch %K'], | |
'Stoch.D': ['Stochastic %D (14, 3, 3)', 'Stoch %D'], | |
'MACD.macd': ['MACD Level (12, 26)', 'MACD Level'], | |
'MACD.signal': ['MACD Signal (12, 26)', 'MACD Signal'], | |
'Aroon.Up': ['Aroon Up (14)', 'Aroon Up'], | |
'Aroon.Down': ['Aroon Down (14)', 'Aroon Down'], | |
'BB.upper': ['Bollinger Upper Band (20)', 'BB Up'], | |
'BB.lower': ['Bollinger Lower Band (20)', 'BB Low'], | |
goodwill: ['Goodwill', 'Goodwill'], | |
debt_to_equity_fq: ['Debt/Equity, MRQ', 'Debt/Eq'], | |
CCI20: ['Commodity Channel Index (20)', 'CCI20'], | |
'DonchCh20.Upper': ['Donchian Channels Upper Band (20)', 'DonchCh20 Up'], | |
'DonchCh20.Lower': ['Donchian Channels Lower Band (20)', 'DonchCh20 Low'], | |
HullMA9: ['Hull Moving Average (9)', 'HullMA9'], | |
AO: ['Awesome Oscillator', 'AO'], | |
'Pivot.M.Classic.S3': ['Pivot Classic S3', 'S3'], | |
'Pivot.M.Classic.S2': ['Pivot Classic S2', 'S2'], | |
'Pivot.M.Classic.S1': ['Pivot Classic S1', 'S1'], | |
'Pivot.M.Classic.Middle': ['Pivot Classic P', 'P'], | |
'Pivot.M.Classic.R1': ['Pivot Classic R1', 'R1'], | |
'Pivot.M.Classic.R2': ['Pivot Classic R2', 'R2'], | |
'Pivot.M.Classic.R3': ['Pivot Classic R3', 'R3'], | |
'Pivot.M.Fibonacci.S3': ['Pivot Fibonacci S3', 'S3'], | |
'Pivot.M.Fibonacci.S2': ['Pivot Fibonacci S2', 'S2'], | |
'Pivot.M.Fibonacci.S1': ['Pivot Fibonacci S1', 'S1'], | |
'Pivot.M.Fibonacci.Middle': ['Pivot Fibonacci P', 'P'], | |
'Pivot.M.Fibonacci.R1': ['Pivot Fibonacci R1', 'R1'], | |
'Pivot.M.Fibonacci.R2': ['Pivot Fibonacci R2', 'R2'], | |
'Pivot.M.Fibonacci.R3': ['Pivot Fibonacci R3', 'R3'], | |
'Pivot.M.Camarilla.S3': ['Pivot Camarilla S3', 'S3'], | |
'Pivot.M.Camarilla.S2': ['Pivot Camarilla S2', 'S2'], | |
'Pivot.M.Camarilla.S1': ['Pivot Camarilla S1', 'S1'], | |
'Pivot.M.Camarilla.Middle': ['Pivot Camarilla P', 'P'], | |
'Pivot.M.Camarilla.R1': ['Pivot Camarilla R1', 'R1'], | |
'Pivot.M.Camarilla.R2': ['Pivot Camarilla R2', 'R2'], | |
'Pivot.M.Camarilla.R3': ['Pivot Camarilla R3', 'R3'], | |
'Pivot.M.Woodie.S3': ['Pivot Woodie S3', 'S3'], | |
'Pivot.M.Woodie.S2': ['Pivot Woodie S2', 'S2'], | |
'Pivot.M.Woodie.S1': ['Pivot Woodie S1', 'S1'], | |
'Pivot.M.Woodie.Middle': ['Pivot Woodie P', 'P'], | |
'Pivot.M.Woodie.R1': ['Pivot Woodie R1', 'R1'], | |
'Pivot.M.Woodie.R2': ['Pivot Woodie R2', 'R2'], | |
'Pivot.M.Woodie.R3': ['Pivot Woodie R3', 'R3'], | |
'Pivot.M.Demark.S1': ['Pivot DM S1', 'S1'], | |
'Pivot.M.Demark.Middle': ['Pivot DM P', 'P'], | |
'Pivot.M.Demark.R1': ['Pivot DM R1', 'R1'], | |
'KltChnl.upper': ['Keltner Channels Upper Band (20)', 'KltCh20 Up'], | |
'KltChnl.lower': ['Keltner Channels Lower Band (20)', 'KltCh20 Low'], | |
'P.SAR': ['Parabolic SAR', 'SAR'], | |
'Value.Traded': ['Volume*Price', 'Volume*Price'], | |
MoneyFlow: [ | |
'Money Flow (14)', | |
('MFI', { context: 'Money_Flow_short_title' }) | |
], | |
ChaikinMoneyFlow: [ | |
'Chaikin Money Flow (20)', | |
('CMF', { context: 'Chaikin_Money_Flow_short_title' }) | |
], | |
'Recommend.All': ['Technical Rating', 'Technical Rating'], | |
'Recommend.MA': ['Moving Averages Rating', 'Moving Averages Rating'], | |
'Recommend.Other': ['Oscillators Rating', 'Oscillators Rating'], | |
'Stoch.RSI.K': ['Stochastic RSI Fast (3, 3, 14, 14)', 'Stoch RSI Fast'], | |
'Stoch.RSI.D': ['Stochastic RSI Slow (3, 3, 14, 14)', 'Stoch RSI Slow'], | |
'W.R': ['Williams Percent Range (14)', '%R'], | |
ROC: ['Rate Of Change (9)', 'ROC'], | |
BBPower: ['Bull Bear Power', 'BBPower'], | |
UO: ['Ultimate Oscillator (7, 14, 28)', 'UO'], | |
'Ichimoku.CLine': [ | |
'Ichimoku Conversion Line (9, 26, 52, 26)', | |
'Ichimoku Conversion' | |
], | |
'Ichimoku.BLine': ['Ichimoku Base Line (9, 26, 52, 26)', 'Ichimoku Base'], | |
'Ichimoku.Lead1': [ | |
'Ichimoku Leading Span A (9, 26, 52, 26)', | |
'Ichimoku Leading Span A' | |
], | |
'Ichimoku.Lead2': [ | |
'Ichimoku Leading Span B (9, 26, 52, 26)', | |
'Ichimoku Leading Span B' | |
], | |
VWAP: ['Volume Weighted Average Price', 'VWAP'], | |
VWMA: ['Volume Weighted Moving Average (20)', 'VWMA'], | |
ADR: ['Average Day Range (14)', 'ADR'], | |
'24h_vol|5': ['Volume 24h in USD', 'Vol 24h in USD'], | |
'24h_vol_change|5': ['Volume 24h Change %', 'Vol 24h Chg %'], | |
total_revenue_yoy_growth_fq: [ | |
'Revenue (Quarterly YoY Growth)', | |
'Revenue (Quarterly YoY Growth)' | |
], | |
total_revenue_qoq_growth_fq: [ | |
'Revenue (Quarterly QoQ Growth)', | |
'Revenue (Quarterly QoQ Growth)' | |
], | |
total_revenue_yoy_growth_fy: [ | |
'Revenue (Annual YoY Growth)', | |
'Revenue (Annual YoY Growth)' | |
], | |
total_revenue_yoy_growth_ttm: [ | |
'Revenue (TTM YoY Growth)', | |
'Revenue (TTM YoY Growth)' | |
], | |
gross_profit_yoy_growth_fq: [ | |
'Gross Profit (Quarterly YoY Growth)', | |
'Gross Profit (Quarterly YoY Growth)' | |
], | |
gross_profit_qoq_growth_fq: [ | |
'Gross Profit (Quarterly QoQ Growth)', | |
'Gross Profit (Quarterly QoQ Growth)' | |
], | |
gross_profit_yoy_growth_fy: [ | |
'Gross Profit (Annual YoY Growth)', | |
'Gross Profit (Annual YoY Growth)' | |
], | |
gross_profit_yoy_growth_ttm: [ | |
'Gross Profit (TTM YoY Growth)', | |
'Gross Profit (TTM YoY Growth)' | |
], | |
ebitda_yoy_growth_fq: [ | |
'EBITDA (Quarterly YoY Growth)', | |
'EBITDA (Quarterly YoY Growth)' | |
], | |
ebitda_qoq_growth_fq: [ | |
'EBITDA (Quarterly QoQ Growth)', | |
'EBITDA (Quarterly QoQ Growth)' | |
], | |
ebitda_yoy_growth_fy: [ | |
'EBITDA (Annual YoY Growth)', | |
'EBITDA (Annual YoY Growth)' | |
], | |
ebitda_yoy_growth_ttm: ['EBITDA (TTM YoY Growth)', 'EBITDA (TTM YoY Growth)'], | |
net_income_yoy_growth_fq: [ | |
'Net Income (Quarterly YoY Growth)', | |
'Net Income (Quarterly YoY Growth)' | |
], | |
net_income_qoq_growth_fq: [ | |
'Net Income (Quarterly QoQ Growth)', | |
'Net Income (Quarterly QoQ Growth)' | |
], | |
net_income_yoy_growth_fy: [ | |
'Net Income (Annual YoY Growth)', | |
'Net Income (Annual YoY Growth)' | |
], | |
net_income_yoy_growth_ttm: [ | |
'Net Income (TTM YoY Growth)', | |
'Net Income (TTM YoY Growth)' | |
], | |
free_cash_flow_yoy_growth_fq: [ | |
'Free Cash Flow (Quarterly YoY Growth)', | |
'Free Cash Flow (Quarterly YoY Growth)' | |
], | |
free_cash_flow_qoq_growth_fq: [ | |
'Free Cash Flow (Quarterly QoQ Growth)', | |
'Free Cash Flow (Quarterly QoQ Growth)' | |
], | |
free_cash_flow_yoy_growth_fy: [ | |
'Free Cash Flow (Annual YoY Growth)', | |
'Free Cash Flow (Annual YoY Growth)' | |
], | |
free_cash_flow_yoy_growth_ttm: [ | |
'Free Cash Flow (TTM YoY Growth)', | |
'Free Cash Flow (TTM YoY Growth)' | |
], | |
earnings_per_share_diluted_yoy_growth_fq: [ | |
'EPS Diluted (Quarterly YoY Growth)', | |
'EPS Diluted (Quarterly YoY Growth)' | |
], | |
earnings_per_share_diluted_qoq_growth_fq: [ | |
'EPS Diluted (Quarterly QoQ Growth)', | |
'EPS Diluted (Quarterly QoQ Growth)' | |
], | |
earnings_per_share_diluted_yoy_growth_fy: [ | |
'EPS Diluted (Annual YoY Growth)', | |
'EPS Diluted (Annual YoY Growth)' | |
], | |
earnings_per_share_diluted_yoy_growth_ttm: [ | |
'EPS Diluted (TTM YoY Growth)', | |
'EPS Diluted (TTM YoY Growth)' | |
], | |
dps_common_stock_prim_issue_yoy_growth_fy: [ | |
'Dividends per share (Annual YoY Growth)', | |
'Dividends per share (Annual YoY Growth)' | |
], | |
total_assets_yoy_growth_fq: [ | |
'Total Assets (Quarterly YoY Growth)', | |
'Total Assets (Quarterly YoY Growth)' | |
], | |
total_assets_qoq_growth_fq: [ | |
'Total Assets (Quarterly QoQ Growth)', | |
'Total Assets (Quarterly QoQ Growth)' | |
], | |
total_assets_yoy_growth_fy: [ | |
'Total Assets (Annual YoY Growth)', | |
'Total Assets (Annual YoY Growth)' | |
], | |
total_debt_yoy_growth_fq: [ | |
'Total Debt (Quarterly YoY Growth)', | |
'Total Debt (Quarterly YoY Growth)' | |
], | |
total_debt_qoq_growth_fq: [ | |
'Total Debt (Quarterly QoQ Growth)', | |
'Total Debt (Quarterly QoQ Growth)' | |
], | |
total_debt_yoy_growth_fy: [ | |
'Total Debt (Annual YoY Growth)', | |
'Total Debt (Annual YoY Growth)' | |
] | |
}; | |
console.log( | |
JSON.stringify( | |
INDICATORS.reduce((previousValue, indicator) => { | |
const result = { | |
title: a[indicator]?.length && a[indicator][0] | |
}; | |
return { | |
...previousValue, | |
[indicator]: result.title?.length ? result : null | |
}; | |
}, {}) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment