text
stringlengths
1
93.6k
action="store",
dest="inputFile",
help="Input filename (in CSV format)",
default=None,
required=True,
)
argumentParser.add_argument(
"-f",
"--output-format",
action="store",
dest="outputFormat",
help="Format of the output file (fxt/hst/hst509/hcc)",
default="fxt",
)
argumentParser.add_argument(
"-p",
"--pair",
action="store",
dest="pair",
help="Symbol pair code (max. 12 chars)",
default="FOOBAR",
)
argumentParser.add_argument(
"-t",
"--timeframe",
action="store",
dest="timeframe",
help="Timeframe (M1, M5, M15, M30, H1, H4, D1, W1, MN1)",
default="M1",
)
argumentParser.add_argument(
"-s",
"--spread",
action="store",
dest="spread",
help="Spread value in points",
default=10,
)
argumentParser.add_argument(
"-d",
"--output-dir",
action="store",
dest="outputDir",
help="Destination directory to save the output file",
default=".",
)
argumentParser.add_argument(
"-S",
"--server",
action="store",
dest="server",
help="Name of FX server",
default="default",
)
argumentParser.add_argument(
"-v",
"--verbose",
action="store_true",
dest="verbose",
help="Enables verbose messages",
)
argumentParser.add_argument(
"-D",
"--debug",
action="store_true",
dest="debug",
help="Enables debugging messages",
)
argumentParser.add_argument(
"-m",
"--model",
action="store",
dest="model",
help="Mode of modeling price for FXT format (0 - Every tick, 1 - Control points, 2 - Open prices)",
default="0",
)
argumentParser.add_argument(
"-h", "--help", action="help", help="Show this help message and exit"
)
return argumentParser
def construct_queue(timeframe_list):
"""Select the apropriate classes and begin the work."""
for timeframe in timeframe_list:
if multiple_timeframes:
print("[INFO] Queueing the {}m timeframe for conversion".format(timeframe))
# Checking output file format argument and doing conversion
if outputFormat == "hst509":
yield HST509(None, ".hst", args.outputDir, timeframe, symbol)
elif outputFormat == "hst":
yield HST574(None, ".hst", args.outputDir, timeframe, symbol)
elif outputFormat == "fxt":
for m in args.model.split(","):
yield FXT(
None,
"_{0}.fxt".format(m),
args.outputDir,