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

Feature/In-Chart Volume, Streamlit TA Indicators #4467

Merged
merged 53 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6e27fcb
init
tehcoderer Mar 13, 2023
330cdd7
rename `add_stock_volume` to `add_inchart_volume` in OpenBBFigure class
tehcoderer Mar 13, 2023
a08ee7e
ruff
tehcoderer Mar 13, 2023
a55eb8e
poetry lock, req txt files
tehcoderer Mar 13, 2023
51d9ec4
fix: ma indicator not in list, connectgaps=true for subtickers
tehcoderer Mar 13, 2023
f794ef5
Merge branch 'OpenBBTerminal-main' into feature/volume-inchart
tehcoderer Mar 13, 2023
b89bd80
Merge branch 'develop' into feature/volume-inchart
tehcoderer Mar 13, 2023
85585e5
improved forecasting streamlit
tehcoderer Mar 13, 2023
286d07f
Merge branch 'feature/volume-inchart' of https://github.com/tehcodere…
tehcoderer Mar 13, 2023
6d57ecb
added past_cov_legend next to explainability plot
tehcoderer Mar 14, 2023
8df09f8
Merge branch 'OpenBBTerminal-main' into feature/volume-inchart
tehcoderer Mar 15, 2023
3e5473a
Update base.py
tehcoderer Mar 15, 2023
3d457c4
updates
tehcoderer Mar 15, 2023
25403f3
Merge branch 'develop' into feature/volume-inchart
tehcoderer Mar 15, 2023
34d18d8
Remove deprecated currencies dashboard and it's dependency
piiq Mar 16, 2023
e6bd9d8
Revert import statement deletion
piiq Mar 16, 2023
91ef289
Lint docstrings and delete unused assets
piiq Mar 16, 2023
5a955b5
Fix forecast voila dashboard
piiq Mar 16, 2023
712ed8f
Fix futures voila dashboard
piiq Mar 16, 2023
58f17a6
Remove broken crypto prices dashboard
piiq Mar 16, 2023
9c0cfb2
Remove vsurf dashboard because of over-verbose yfinance error messages
piiq Mar 16, 2023
13f913b
Fix chains dashboard chart title positioning
piiq Mar 16, 2023
b2f6e32
Remove i18n entries for deleted dashboards
piiq Mar 16, 2023
797196d
streamlit cmdline fix for macs/conda
tehcoderer Mar 16, 2023
2118611
Merge branch 'OpenBB-finance:develop' into feature/volume-inchart
tehcoderer Mar 16, 2023
a005125
Update reddit_model.py
tehcoderer Mar 16, 2023
503579e
Merge branch 'feature/volume-inchart' of https://github.com/tehcodere…
tehcoderer Mar 16, 2023
2e20e46
mypy, fixed removed `load_dotenv_and_reload_configs` in `website\cont…
tehcoderer Mar 16, 2023
1191480
Merge branch 'develop' into feature/volume-inchart
tehcoderer Mar 17, 2023
404693d
readded rust install on CLI for linux in case cache gets cleared
tehcoderer Mar 17, 2023
1f1d6b2
Update forex_helper.py
tehcoderer Mar 17, 2023
cbf86c1
Merge branch 'OpenBBTerminal-main' into feature/volume-inchart
tehcoderer Mar 18, 2023
f65cdfa
Update test_load[60-YahooFinance].csv
tehcoderer Mar 18, 2023
afdf069
Update test_call_func[call_sec-marketwatch_view.sec_filings-other_arg…
tehcoderer Mar 18, 2023
7638ac3
deps
tehcoderer Mar 18, 2023
2575784
sdk generation tests, trailmap fixes
tehcoderer Mar 18, 2023
5cb0ce0
Revert "sdk generation tests, trailmap fixes"
tehcoderer Mar 18, 2023
b01df42
Revert "Revert "sdk generation tests, trailmap fixes""
tehcoderer Mar 18, 2023
6169bfb
improve ta-multi, add title/legends to fred_view
tehcoderer Mar 18, 2023
7617026
Update ta_controller.py
tehcoderer Mar 19, 2023
071b691
ruff
tehcoderer Mar 19, 2023
4f91723
Update helper_funcs.py
tehcoderer Mar 19, 2023
85e15e2
Update yfinance_view.py
tehcoderer Mar 19, 2023
c1ba485
Update helper_funcs.py
tehcoderer Mar 19, 2023
e8cf280
change executable parent paths to REPOSITORY_DIRECTORY
tehcoderer Mar 20, 2023
d72b09d
fix distorted candlestick plots when freq is weekly/month, fix demark
tehcoderer Mar 21, 2023
5b8fdd8
Merge branch 'OpenBBTerminal-main' into feature/volume-inchart
tehcoderer Mar 21, 2023
fa75a69
fix yaxis click handler
tehcoderer Mar 21, 2023
c082f2f
Update popups.js
tehcoderer Mar 21, 2023
a87d49d
Update popups.js
tehcoderer Mar 21, 2023
0166faf
Update popups.js
tehcoderer Mar 21, 2023
bec6547
Update volatility_plugin.py
tehcoderer Mar 21, 2023
7b5e310
Merge branch 'develop' into feature/volume-inchart
tehcoderer Mar 21, 2023
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* linguist-vendored
*.py linguist-vendored=false
text eol=lf
4 changes: 4 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:

- name: Setup sudo apt installs for ubuntu-latest
run: |
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand Down Expand Up @@ -159,6 +160,7 @@ jobs:

- name: Setup sudo apt installs for ubuntu-latest
run: |
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand Down Expand Up @@ -241,6 +243,7 @@ jobs:
- name: Setup sudo apt installs for ubuntu-latest
if: runner.os == 'Linux'
run: |
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand Down Expand Up @@ -321,6 +324,7 @@ jobs:
- name: Setup sudo apt installs for ubuntu-latest
if: runner.os == 'Linux'
run: |
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand Down
5 changes: 4 additions & 1 deletion openbb_terminal/alternative/covid/covid_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def display_covid_ov(
export: str = "",
sheet_name: Optional[str] = None,
plot: bool = True,
external_axes: bool = False,
) -> Union[OpenBBFigure, None]:
"""Prints table showing historical cases and deaths by country.

Expand All @@ -177,6 +178,8 @@ def display_covid_ov(
Format to export data
plot: bool
Flag to display historical plot
external_axes : bool, optional
Whether to return the figure object or not, by default False
"""
fig = OpenBBFigure()

Expand Down Expand Up @@ -207,7 +210,7 @@ def display_covid_ov(
fig,
)

return fig.show(external=raw)
return fig.show(external=raw or external_axes)


@log_start_end(log=logger)
Expand Down
6 changes: 5 additions & 1 deletion openbb_terminal/common/quantitative_analysis/qa_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def display_bw(
>>> df = openbb.stocks.load("AAPL")
>>> openbb.qa.bw(data=df, target="Adj Close")
"""
data = data.copy()
start = data[target].index[0]

color = theme.get_colors()[0]
Expand All @@ -288,7 +289,10 @@ def display_bw(
]

fig = OpenBBFigure(
title=f"{['Monthly','Yearly'][yearly]} box plot of {symbol} {target} from {start.strftime('%Y-%m-%d')}",
title=(
f"{['Monthly','Yearly'][yearly]} box plot of {symbol.upper()} "
f"{target} from {start.strftime('%Y-%m-%d')}"
),
yaxis_title=target,
xaxis_title=["Monthly", "Yearly"][yearly],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def plot_multiple_indicators(
data: pd.DataFrame,
indicators: List[str],
symbol: str = "",
window: Optional[List[int]] = None,
params: Optional[dict] = None,
export: str = "",
sheet_name: Optional[str] = None,
external_axes: bool = False,
Expand Down Expand Up @@ -135,15 +135,15 @@ def plot_multiple_indicators(
if ta_helpers.check_columns(data) is None:
return None

if window is None:
window = [20, 50]

indicators_dict: dict = {indicator: {} for indicator in indicators}
if params:
indicators_dict.update(params)

ta = PlotlyTA()

for ma in ta.ma_mode:
if ma in indicators_dict:
indicators_dict[ma] = dict(length=window)
if ma in indicators_dict and not indicators_dict[ma].get("length", None):
indicators_dict[ma] = dict(length=[20, 50])

fig = ta.plot(
data,
Expand Down
3 changes: 0 additions & 3 deletions openbb_terminal/core/completer/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def __mock_parse_known_args_and_warn(
default=sources[0], # the first source from the list is the default
help="Data source to select from",
)
return None


def __mock_parse_simple_args(parser: ArgumentParser, other_args: List[str]) -> None:
Expand All @@ -110,8 +109,6 @@ def __mock_parse_simple_args(parser: ArgumentParser, other_args: List[str]) -> N
)
_ = other_args

return None


def __get_command_func(controller, command: str):
"""Get the function with the name `f"call_{command}"` from controller object.
Expand Down
2 changes: 1 addition & 1 deletion openbb_terminal/core/config/paths_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def init_userdata():
"""
Initializes the user data folder
"""
global initialized
global initialized # noqa
if not initialized:
create_paths(dirs_list)
create_files(dirs_files)
Expand Down
2 changes: 1 addition & 1 deletion openbb_terminal/core/plots/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ async def download_plotly_js():

def plots_backend() -> Backend:
"""Get the backend."""
global BACKEND # pylint: disable=W0603
global BACKEND # pylint: disable=W0603 # noqa
if BACKEND is None:
BACKEND = Backend()
return BACKEND
6 changes: 5 additions & 1 deletion openbb_terminal/core/plots/plotly.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
// calling OpenBBMain to avoid errors
if (typeof OpenBBMain != "undefined" && window.plotly_figure) {
clearInterval(interval);
OpenBBMain(window.plotly_figure, document.getElementById("openbb_chart"));
CHART_DIV = document.getElementById("openbb_chart");
CSV_DIV = document.getElementById("popup_csv");
TEXT_DIV = document.getElementById("popup_text");
TITLE_DIV = document.getElementById("popup_title");
OpenBBMain(window.plotly_figure, CHART_DIV, CSV_DIV, TEXT_DIV, TITLE_DIV);
}
}, 20);
</script>
Expand Down
Loading