added option to jump from scr to po. Just pass stocks spaced apart

This commit is contained in:
Jamie
2021-04-13 13:43:06 -04:00
parent 940fa9465b
commit c18327dc13
2 changed files with 19 additions and 1 deletions

View File

@@ -23,7 +23,8 @@ This menu aims to filter stocks based on pre-specified preset filters, and the u
* contains [Oversold (-s) signal example](#signal-oversold)
* [signals](#signals)
* view filter signals (e.g. -s top_gainers) [Finviz]
* [po](#port_opt)
* go to the portfolio optimization menu
## view <a name="view"></a>
@@ -180,3 +181,13 @@ Prints list of available signals. [Source: Finviz]
<img width="937" alt="Captura de ecrã 2021-04-05, às 20 25 13" src="https://user-images.githubusercontent.com/25267873/113616495-0ece9580-964d-11eb-97af-4150f928a170.png">
## po <a name="port_opt"></a>
Goes to the portfolio menu with list of passed stocks. In order to pass the stocks, just type the tickers of interest, no commas.
```
usage: po ticker1 ticker2 ...
```
````
example: po aapl msft tsla gme
````

View File

@@ -14,6 +14,7 @@ from gamestonk_terminal.helper_funcs import (
)
from gamestonk_terminal.screener import finviz_view
from gamestonk_terminal.screener import yahoo_finance_view
from gamestonk_terminal.portfolio_optimization import po_controller
class ScreenerController:
@@ -34,6 +35,7 @@ class ScreenerController:
"performance",
"technical",
"signals",
"po",
]
def __init__(self):
@@ -69,6 +71,8 @@ class ScreenerController:
print("")
print(" signals view filter signals (e.g. -s top_gainers)")
print("")
print(" > po go to the portfolio optimization menu")
print("")
@staticmethod
def view_available_presets(other_args: List[str]):
@@ -217,6 +221,9 @@ class ScreenerController:
"""Process signals command"""
finviz_view.view_signals(other_args)
def call_po(self, other_args: List[str]):
return po_controller.menu(other_args)
def menu():
"""Screener Menu"""