_USERNAME = "******"
_PASSWORD = "******"
# Chrome
_CHROME_NAME = 'chrome'
_CHROME_DRIVER = r'C:\tools\chromedriver\chromedriver.exe'

##### STEPS BY STEPS running  #########

# 1) start webdriver
base_url = "https://www.trading212.com"
browser_driver = WebBrowser(
    _CHROME_NAME, driver_path=_CHROME_DRIVER).getWebDriverInstance(base_url)

# 2) login
fxfinal = FxFinalDecision(browser_driver)
fxfinal.autologin_firstwindows(base_url, _USERNAME, _PASSWORD)

# 3) pop-up window (which ask to upload ID documents)
fxfinal.close_popup_ask_upload_docs()

# 4) switch to Practice Mode   # Real or Practice
fxfinal.mode_live_or_demo("Practice")

# 5) go to speficic currency or looping all currencies   # looping_check_all_currencies(driver)
### AUTO RUN SCRIPTS - BUY / SELL / CLOSE POSITION AUTOMATICALLY & CONTINOUSLY

pilihan = 0
while pilihan != 99:
    value_EMA = 25
    tperiod = '1 minute'
    check_cfd_current = fxfinal.close_position_CFD_ANY_auto_MACD(
예제 #2
0
from Forex_CFD.base.webdriverfactory import WebDriverFactory as webbrowser
from Forex_CFD.features.final_fx_decision import FxFinalDecision

##### STEPS BY STEPS running  #########

# 1) start webdriver
base_url = "https://www.trading212.com"
chromedriver = webbrowser('chrome').getWebDriverInstance(base_url)

# 2) login
user1 = "*****@*****.**"
pswd1 = "Serverg0d!"

fxfinal = FxFinalDecision(chromedriver)
fxfinal.autologin_firstwindows(base_url, user1, pswd1)

# 3) pop-up window (which ask to upload ID documents)
fxfinal.close_popup_ask_upload_docs()

# 4) switch to Practice Mode   # Real or Practice
fxfinal.mode_live_or_demo("Practice")

# 5) go to speficic currency or looping all currencies   # looping_check_all_currencies(driver)
# 6) Buy/Sell/Close_Position

## NOW COMBINE NO 5) & 6)

pilihan = 0
rerun = 'Y'
value_EMA = 25