示例#1
0
def plot_parse_args(args: List[str]) -> Namespace:
    """
    Parse args passed to the script
    :param args: Cli arguments
    :return: args: Array with all arguments
    """
    arguments = Arguments(args, 'Graph dataframe')
    arguments.scripts_options()
    arguments.parser.add_argument(
        '--indicators1',
        help=
        'Set indicators from your strategy you want in the first row of the graph. Separate '
        'them with a coma. E.g: ema3,ema5 (default: %(default)s)',
        type=str,
        default='sma,ema3,ema5',
        dest='indicators1',
    )

    arguments.parser.add_argument(
        '--indicators2',
        help=
        'Set indicators from your strategy you want in the third row of the graph. Separate '
        'them with a coma. E.g: fastd,fastk (default: %(default)s)',
        type=str,
        default='macd',
        dest='indicators2',
    )

    arguments.common_args_parser()
    arguments.optimizer_shared_options(arguments.parser)
    arguments.backtesting_options(arguments.parser)

    return arguments.parse_args()
示例#2
0
def plot_parse_args(args: List[str]) -> Namespace:
    """
    Parse args passed to the script
    :param args: Cli arguments
    :return: args: Array with all arguments
    """
    arguments = Arguments(args, 'Graph profits')
    arguments.scripts_options()
    arguments.common_args_parser()
    arguments.optimizer_shared_options(arguments.parser)
    arguments.backtesting_options(arguments.parser)

    return arguments.parse_args()
示例#3
0
def test_scripts_options() -> None:
    arguments = Arguments(['-p', 'ETH/BTC'], '')
    arguments.scripts_options()
    args = arguments.get_parsed_arg()
    assert args.pairs == 'ETH/BTC'