Beispiel #1
0
import time 
import logging
import sys 
from market_data import MarketData 
from strategy_loop import Strategy 
from proto_objs.capk_globals_pb2 import BID, ASK
from logging_helpers import create_logger

logger = create_logger("uncross", 
  console_level = logging.WARN, 
  file_name = "test_synth_modify.log", 
  file_level = logging.DEBUG)



STRATEGY_ID = '47018467-9a66-405d-9f3b-4203a356c884'
md = MarketData()
# we get an order_manager back from Strategy.connect
order_manager = None
updated_symbols = set([])
cross = None

# a pair of entries for bid and offer
class Cross:
  def __init__(self, bid_entry, offer_entry):
    self.bid_entry = bid_entry
    self.offer_entry = offer_entry
    self.start_time = time.time()
    # these get filled in after the orders get created/sent 
    self.send_time = None
    self.bid_order_id = None
Beispiel #2
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import logging
from fix_constants import HANDLING_INSTRUCTION, EXEC_TYPE, \
    EXEC_TRANS_TYPE, ORDER_STATUS
import sys
from market_data import MarketData
from strategy_loop import Strategy
from proto_objs.capk_globals_pb2 import BID, ASK
from logging_helpers import create_logger

logger = create_logger('uncross', console_level=logging.DEBUG,
                       console_handler=logging.StreamHandler(sys.stdout),
                       file_name='uncross.log',
                       file_level=logging.DEBUG)

STRATEGY_ID = 'f16e8fc3-846e-43e5-a3bf-8728f42e7972'
md = MarketData()

# we get an order_manager back from Strategy.connect

order_manager = None
updated_symbols = set([])
cross = None


# a pair of entries for bid and offer

class Cross:
Beispiel #3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import logging
import sys
from market_data import MarketData
from strategy_loop import Strategy
from proto_objs.capk_globals_pb2 import BID, ASK
from logging_helpers import create_logger
import order_constants

logger = create_logger('market_test', console_level=logging.DEBUG,
                       console_handler=logging.StreamHandler(sys.stdout),
                       file_name='market_test.log',
                       file_level=logging.DEBUG)

# Original

STRATEGY_ID = '46210d2f-61b0-48fe-be15-4cdf17b14b48'

# Uncrosser's ID
# STRATEGY_ID = 'f16e8fc3-846e-43e5-a3bf-8728f42e7972'

md = MarketData()

# we get an order_manager back from Strategy.connect

order_manager = None
updated_symbols = set([])

bid = None