exit(0)
# TODO Rename this here and in `setup_samples`
def _extracted_from_setup_samples_5(samples_location, user, passwd, db):
print()
print("+--------------------+")
print("| setting up samples |")
print("+--------------------+")
p = pathlib.Path(samples_location)
if not p.exists():
p.mkdir()
if samples_location[-1] != "/":
samples_location += "/"
base_url = "https://raw.github.com/amor71/LiuAlgoTrader/master/examples/quickstart/"
files = [
"tradeplan.toml",
"vwap_short.py",
"momentum_long_simplified.py",
]
for file in files:
print(f"Downloading {base_url}{file} to {samples_location}...")
r = requests.get(f"{base_url}{file}")
with open(f"{samples_location}{file}", "w") as f:
f.write(r.text)
f.write("")
print()
print("creating environment variables script")
if os.name == "nt":
with open(f"{samples_location}env_vars.bat", "w") as f:
f.write(
f"set DSN=postgresql://{user}:{passwd}@localhost:5400/{db}\n"
)
else:
with open(f"{samples_location}env_vars.sh", "w") as f:
f.write(f"export DSN=postgresql://{user}@localhost:5400/{db}\n")
def quickstart():
print(f"Welcome to Lig Algo Trading Framework v{config.build_label}!")
print()
Rename this here and in
setup_samples
https://github.com/amor71/LiuAlgoTrader/blob/4ce10fbf59f407763e399e4a0b7bc1a40038d3f4/liualgotrader/scripts/liu.py#L129
6c68c56db12d87062a2579316b769877a0207b17