Skip to content

Commit

Permalink
#47 little typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim55667757 committed Sep 30, 2022
1 parent 451a6ab commit 0a53a7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/examples/scenario1.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
from math import ceil
from tksbrokerapi.TKSBrokerAPI import TinkoffBrokerServer, uLogger # main module for trading operations

uLogger.level = 10 # DEBUG (10) log level recommended by default for file `TKSBrokerAPI.log
uLogger.level = 10 # DEBUG (10) log level recommended by default for file `TKSBrokerAPI.log`
uLogger.handlers[0].level = 20 # log level for STDOUT, INFO (20) recommended by default

start = datetime.now(tzutc())
Expand Down Expand Up @@ -141,13 +141,13 @@
# - if the buyers volumes in the DOM are at least 10% higher than the sellers volumes, then buy 1 share on the market
# and place the take profit as a stop order 3% higher than the current buy price with expire in 1 hour;

# Checks if instrument is in portfolio:
# Checks if instrument (defined by it's `ticker`) is in portfolio:
isInPortfolio = trader.IsInPortfolio(portfolio) # TKSBrokerAPI: https://tim55667757.github.io/TKSBrokerAPI/docs/tksbrokerapi/TKSBrokerAPI.html#TinkoffBrokerServer.IsInPortfolio

if not isInPortfolio:
uLogger.info("Ticker [{}]: no current open positions with that instrument, checking opens rules...".format(trader.ticker))

# Getting instrument's data and it currency:
# Getting instrument's data and its currency:
rawIData = trader.SearchByTicker(requestPrice=False, showInfo=False, debug=False) # TKSBrokerAPI: https://tim55667757.github.io/TKSBrokerAPI/docs/tksbrokerapi/TKSBrokerAPI.html#TinkoffBrokerServer.SearchByTicker
iCurr = rawIData["currency"] # currency of current instrument

Expand Down

0 comments on commit 0a53a7a

Please # to comment.