How do I handle order execution time



  • In my TestStrategy I use the following lines to log the input to the next function:

     def next(self):
            # Simply log the closing price of the series from the reference
            
            self.log("Input: %s" %
                    (self.dataclose[0]))
            # Check if an order is pending ... if yes, we cannot send a 2nd one
            if self.order:
                return
            
            self.log("Input2: %s" %
                    (self.dataclose[0]))
    

    The code is from the quickstart text, with my modification of output logging.

    My question is, when I place a order and the time it takes to complete it, I get new input during that time that I can not process because of the self.order check.

    Why does the order compleation take that much time. In my case when testing I get about 85 to 90 new input events?



  • Do you mind to share more details about your script?

    Normally market orders are completed at the open of the next bar if it is enough cash on the account.



  • @ab_trader
    I have copied the example code in the documentation and change the indicators and when to buy or sell.

    from __future__ import (absolute_import, division, print_function,
                            unicode_literals)
    
    import datetime  # For datetime objects
    import os.path  # To manage paths
    import sys  # To find out the script name (in argv[0])
    
    # Import the backtrader platform
    import backtrader as bt
    import backtrader.feeds as btfeeds
    import true_strength_indicator as tsi
    
    # Create a Stratey
    class TestStrategy(bt.Strategy):
        params = (
            ('maperiod', 15),
        )
    
        def log(self, txt, dt=None):
            ''' Logging function for this strategy'''
            dt = dt or self.datas[0].datetime.date(0)
            dt2 = self.datas[0].datetime.time(0)
            print('%s %s, %s' % (dt.isoformat(),dt2, txt))
    
        def __init__(self):
            # Keep a reference to the "close" line in the data[0] dataseries
            self.dataclose = self.datas[0].close
            
            # To keep track of pending orders and buy price/commission
            self.order = None
            self.long = None
            self.short = None
            self.buyprice = None
            self.buycomm = None
    
            # Indicators for the plotting show
            ci = tsi.TrueStrengthIndicator(self.datas[0].close,period1=25, period2=13)
            p4 = bt.indicators.ExponentialMovingAverage(self.datas[0], period=4)
            bt.indicators.ExponentialMovingAverage(self.datas[0], period=60)
            bt.indicators.ExponentialMovingAverage(self.datas[0], period=200)
            
            self.buySignal = bt.And(ci > ci(-1), p4 > p4(-1))
            self.sellSignal = bt.And(ci < ci(-1), p4 < p4(-1))
            
    
        def notify_order(self, order):
            if order.status in [order.Submitted, order.Accepted]:
                # Buy/Sell order submitted/accepted to/by broker - Nothing to do
                return
    
            # Check if an order has been completed
            # Attention: broker could reject order if not enougth cash
            if order.status in [order.Completed]:
                if order.isbuy():
                    self.log(
                        'BUY EXECUTED, Price: %.5f, Cost: %.5f, Comm %.2f' %
                        (order.executed.price,
                         order.executed.value,
                         order.executed.comm))
    
                    self.buyprice = order.executed.price
                    self.buycomm = order.executed.comm
                else:  # Sell
                    self.log('SELL EXECUTED, Price: %.5f, Cost: %.5f, Comm %.2f' %
                             (order.executed.price,
                              order.executed.value,
                              order.executed.comm))
    
                self.bar_executed = len(self)
    
            elif order.status in [order.Canceled, order.Margin, order.Rejected]:
                self.log('Order Canceled/Margin/Rejected')
    
            # Write down: no pending order
            self.order = None
    
        def notify_trade(self, trade):
            if not trade.isclosed:
                return
    
            self.log('OPERATION PROFIT, GROSS %.2f, NET %.2f' %
                     (trade.pnl, trade.pnlcomm))
    
        def next(self):
            # Simply log the closing price of the series from the reference
            #self.log('Close, %.5f' % (self.dataclose[0]))
    
            self.log("Input: %s" %
                    (self.dataclose[0]))
            # Check if an order is pending ... if yes, we cannot send a 2nd one
            if self.order:
                return
            
            self.log("Input2: %s" %
                    (self.dataclose[0]))
            # Not yet ... we MIGHT BUY if ...
            if self.buySignal and not self.long:
                self.close()
                # BUY, BUY, BUY!!! (with all possible default parameters)
                self.log('BUY CREATE, %.5f' % (self.dataclose[0]))
    
                # Keep track of the created order to avoid a 2nd order
                self.order = self.buy()
                self.long = self.order
                self.short = None
    
            if self.sellSignal and not self.short:
                self.close()
                # SELL, SELL, SELL!!! (with all possible default parameters)
                self.log('SELL CREATE, %.5f' % self.dataclose[0])
    
                # Keep track of the created order to avoid a 2nd order
                self.order = self.sell()
                self.short = self.order
                self.long = None
    			
    def main():
        # Create a cerebro entity
        cerebro = bt.Cerebro()
    
        # Add a strategy
        cerebro.addstrategy(TestStrategy)
    
        # Datas are in a subfolder of the samples. Need to find where the script is
        # because it could have been called from anywhere
        modpath = os.path.dirname(os.path.abspath(sys.argv[0]))
        datapath = os.path.join(modpath, 'EURUSD5M.csv')
    
        # Create a Data Feed
        data = btfeeds.GenericCSVData(
            dataname='EURUSD5M.csv',
    
            fromdate=datetime.datetime(2017, 2, 28),
            todate=datetime.datetime(2017, 3, 24),
    
            nullvalue=0.0,
    
            dtformat=('%Y.%m.%d'),
            tmformat=('%H:%M'),
    
            datetime=0,
            time=1,
            open=2,
            high=3,
            low=4,
            close=5,
            volume=6,
            openinterest=-1
        )
    
        # Add the Data Feed to Cerebro
        cerebro.adddata(data)
    
        # Set our desired cash start
        cerebro.broker.setcash(1000.0)
    
        # Add a FixedSize sizer according to the stake
        cerebro.addsizer(bt.sizers.FixedSize, stake=10)
    
        # Set the commission
        cerebro.broker.setcommission(commission=0.0)
    
        # Print out the starting conditions
        print('Starting Portfolio Value: %.2f' % cerebro.broker.getvalue())
    
        # Run over everything
        cerebro.run()
    
        # Print out the final result
        print('Final Portfolio Value: %.2f' % cerebro.broker.getvalue())
    
        # Plot the result
        cerebro.plot()
        
    if __name__ == '__main__':
        main()
    

    This the true strength indicator:

    import backtrader as bt
    import backtrader.indicators as btind
    import math
    
    class TrueStrengthIndicator(bt.Indicator):
        lines = ('tsi',)
        params = dict(
            # Long period
            period1=25,
    
            # Short period
            period2=13)
    
        plotinfo = dict(
            # Add extra margins above and below the 1s and -1s
            plotymargin=0.15,
    
            # Plot a reference horizontal line at 1.0 and -1.0
            plothlines=[0, 10, -10],
    
            # Simplify the y scale to 1.0 and -1.0
            plotyticks=[100, -100])
    
        # Plot the line "overunder" (the only one) with dash style
        # ls stands for linestyle and is directly passed to matplotlib
        plotlines = dict(tsi=dict(ls='-'))
    
        def _plotlabel(self):
            # This method returns a list of labels that will be displayed
            # behind the name of the indicator on the plot
    
            # The period must always be there
            plabels = [25]
    
            # Put only the moving average if it's not the default one
            plabels += "TSI"
    
            return plabels
    
        def __init__(self):
            super(TrueStrengthIndicator, self).__init__()
            pc = self.data - self.data(-1)
            smooth1 = bt.ind.EMA(bt.ind.EMA(pc, period=self.p.period1), period=self.p.period2)
            smooth2 = bt.ind.EMA(bt.ind.EMA(abs(pc), period=self.p.period1), period=self.p.period2)
            self.lines.tsi = 100.0 * (smooth1 / smooth2)
    


  • I've run your script - didn't notice any errors. Signals were generated and on the next bar positions were reversed or opened in case of first signal. I don't see any delays and have two lines for each bar: one with Input and one with Input2.

    0_1495397198875_2017-05-21_13-06-17.png

    Two lower diagrams are Buy and Sell signals.
    Here is an output (I've added couple items) for first trade:

    Starting Portfolio Value: 100000.00
    2015-10-16 23:59:59.999989, Input: 203.270004, Buy: 1.0, Sell 0.0, Position 0
    2015-10-16 23:59:59.999989, Input2: 203.270004, Buy: 1.0, Sell 0.0, Position 0
    2015-10-16 23:59:59.999989, BUY CREATE, 203.27000
    2015-10-19 23:59:59.999989, BUY EXECUTED, Price: 202.50000, Cost: 2025.00000, Comm 0.00
    2015-10-19 23:59:59.999989, Input: 203.369995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-19 23:59:59.999989, Input2: 203.369995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-20 23:59:59.999989, Input: 203.110001, Buy: 1.0, Sell 0.0, Position 10
    2015-10-20 23:59:59.999989, Input2: 203.110001, Buy: 1.0, Sell 0.0, Position 10
    2015-10-21 23:59:59.999989, Input: 201.850006, Buy: 0.0, Sell 0.0, Position 10
    2015-10-21 23:59:59.999989, Input2: 201.850006, Buy: 0.0, Sell 0.0, Position 10
    2015-10-22 23:59:59.999989, Input: 205.259995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-22 23:59:59.999989, Input2: 205.259995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-23 23:59:59.999989, Input: 207.509995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-23 23:59:59.999989, Input2: 207.509995, Buy: 1.0, Sell 0.0, Position 10
    2015-10-26 23:59:59.999989, Input: 207.0, Buy: 1.0, Sell 0.0, Position 10
    2015-10-26 23:59:59.999989, Input2: 207.0, Buy: 1.0, Sell 0.0, Position 10
    2015-10-27 23:59:59.999989, Input: 206.600006, Buy: 1.0, Sell 0.0, Position 10
    2015-10-27 23:59:59.999989, Input2: 206.600006, Buy: 1.0, Sell 0.0, Position 10
    2015-10-28 23:59:59.999989, Input: 208.949997, Buy: 1.0, Sell 0.0, Position 10
    2015-10-28 23:59:59.999989, Input2: 208.949997, Buy: 1.0, Sell 0.0, Position 10
    2015-10-29 23:59:59.999989, Input: 208.830002, Buy: 1.0, Sell 0.0, Position 10
    2015-10-29 23:59:59.999989, Input2: 208.830002, Buy: 1.0, Sell 0.0, Position 10
    2015-10-30 23:59:59.999989, Input: 207.929993, Buy: 1.0, Sell 0.0, Position 10
    2015-10-30 23:59:59.999989, Input2: 207.929993, Buy: 1.0, Sell 0.0, Position 10
    2015-11-02 23:59:59.999989, Input: 210.389999, Buy: 1.0, Sell 0.0, Position 10
    2015-11-02 23:59:59.999989, Input2: 210.389999, Buy: 1.0, Sell 0.0, Position 10
    2015-11-03 23:59:59.999989, Input: 211.0, Buy: 1.0, Sell 0.0, Position 10
    2015-11-03 23:59:59.999989, Input2: 211.0, Buy: 1.0, Sell 0.0, Position 10
    2015-11-04 23:59:59.999989, Input: 210.360001, Buy: 1.0, Sell 0.0, Position 10
    2015-11-04 23:59:59.999989, Input2: 210.360001, Buy: 1.0, Sell 0.0, Position 10
    2015-11-05 23:59:59.999989, Input: 210.149994, Buy: 1.0, Sell 0.0, Position 10
    2015-11-05 23:59:59.999989, Input2: 210.149994, Buy: 1.0, Sell 0.0, Position 10
    2015-11-06 23:59:59.999989, Input: 210.039993, Buy: 0.0, Sell 0.0, Position 10
    2015-11-06 23:59:59.999989, Input2: 210.039993, Buy: 0.0, Sell 0.0, Position 10
    2015-11-09 23:59:59.999989, Input: 208.080002, Buy: 0.0, Sell 1.0, Position 10
    2015-11-09 23:59:59.999989, Input2: 208.080002, Buy: 0.0, Sell 1.0, Position 10
    2015-11-09 23:59:59.999989, SELL CREATE, 208.08000
    2015-11-10 23:59:59.999989, SELL EXECUTED, Price: 207.50999, Cost: 2025.00000, Comm 0.00
    2015-11-10 23:59:59.999989, SELL EXECUTED, Price: 207.50999, Cost: -2075.09995, Comm 0.00
    2015-11-10 23:59:59.999989, OPERATION PROFIT, GROSS 50.10, NET 50.10
    2015-11-10 23:59:59.999989, Input: 208.559998, Buy: 0.0, Sell 1.0, Position -10
    2015-11-10 23:59:59.999989, Input2: 208.559998, Buy: 0.0, Sell 1.0, Position -10
    2015-11-11 23:59:59.999989, Input: 207.740005, Buy: 0.0, Sell 1.0, Position -10
    2015-11-11 23:59:59.999989, Input2: 207.740005, Buy: 0.0, Sell 1.0, Position -10
    2015-11-12 23:59:59.999989, Input: 204.839996, Buy: 0.0, Sell 1.0, Position -10
    2015-11-12 23:59:59.999989, Input2: 204.839996, Buy: 0.0, Sell 1.0, Position -10
    2015-11-13 23:59:59.999989, Input: 202.539993, Buy: 0.0, Sell 1.0, Position -10
    


  • @ab_trader
    This is strange... I'm using 5m input data and get the following output:

    Starting Portfolio Value: 1000.00
    second
    2017-02-28 23:59:59.999989, Input: 1.0617
    2017-02-28 23:59:59.999989, Input2: 1.0617
    2017-02-28 23:59:59.999989, SELL CREATE, 1.06170
    2017-02-28 23:59:59.999989, Input: 1.06199
    2017-02-28 23:59:59.999989, Input: 1.06049
    2017-02-28 23:59:59.999989, Input: 1.06105
    2017-02-28 23:59:59.999989, Input: 1.06253
    2017-02-28 23:59:59.999989, Input: 1.0626
    2017-02-28 23:59:59.999989, Input: 1.06185
    2017-02-28 23:59:59.999989, Input: 1.06193
    2017-02-28 23:59:59.999989, Input: 1.06164
    2017-02-28 23:59:59.999989, Input: 1.06165
    2017-02-28 23:59:59.999989, Input: 1.06155
    2017-02-28 23:59:59.999989, Input: 1.06154
    2017-02-28 23:59:59.999989, Input: 1.06144
    2017-02-28 23:59:59.999989, Input: 1.06144
    2017-02-28 23:59:59.999989, Input: 1.06197
    2017-02-28 23:59:59.999989, Input: 1.06229
    2017-02-28 23:59:59.999989, Input: 1.06171
    2017-02-28 23:59:59.999989, Input: 1.06152
    2017-02-28 23:59:59.999989, Input: 1.06142
    2017-02-28 23:59:59.999989, Input: 1.06164
    2017-02-28 23:59:59.999989, Input: 1.06224
    2017-02-28 23:59:59.999989, Input: 1.06225
    2017-02-28 23:59:59.999989, Input: 1.06194
    2017-02-28 23:59:59.999989, Input: 1.06179
    2017-02-28 23:59:59.999989, Input: 1.06174
    2017-02-28 23:59:59.999989, Input: 1.06149
    2017-02-28 23:59:59.999989, Input: 1.06113
    2017-02-28 23:59:59.999989, Input: 1.06061
    2017-02-28 23:59:59.999989, Input: 1.06071
    2017-02-28 23:59:59.999989, Input: 1.06088
    2017-02-28 23:59:59.999989, Input: 1.06071
    2017-02-28 23:59:59.999989, Input: 1.06076
    2017-02-28 23:59:59.999989, Input: 1.06065
    2017-02-28 23:59:59.999989, Input: 1.06073
    2017-02-28 23:59:59.999989, Input: 1.06103
    2017-02-28 23:59:59.999989, Input: 1.06045
    2017-02-28 23:59:59.999989, Input: 1.06041
    2017-02-28 23:59:59.999989, Input: 1.0606
    2017-02-28 23:59:59.999989, Input: 1.06036
    2017-02-28 23:59:59.999989, Input: 1.05991
    2017-02-28 23:59:59.999989, Input: 1.06013
    2017-02-28 23:59:59.999989, Input: 1.05985
    2017-02-28 23:59:59.999989, Input: 1.05987
    2017-02-28 23:59:59.999989, Input: 1.06015
    2017-02-28 23:59:59.999989, Input: 1.06029
    2017-02-28 23:59:59.999989, Input: 1.06035
    2017-02-28 23:59:59.999989, Input: 1.06005
    2017-02-28 23:59:59.999989, Input: 1.05973
    2017-02-28 23:59:59.999989, Input: 1.05965
    2017-02-28 23:59:59.999989, Input: 1.05967
    2017-02-28 23:59:59.999989, Input: 1.05943
    2017-02-28 23:59:59.999989, Input: 1.05955
    2017-02-28 23:59:59.999989, Input: 1.05918
    2017-02-28 23:59:59.999989, Input: 1.05928
    2017-02-28 23:59:59.999989, Input: 1.05951
    2017-02-28 23:59:59.999989, Input: 1.05957
    2017-02-28 23:59:59.999989, Input: 1.05976
    2017-02-28 23:59:59.999989, Input: 1.05929
    2017-02-28 23:59:59.999989, Input: 1.0589
    2017-02-28 23:59:59.999989, Input: 1.05892
    2017-02-28 23:59:59.999989, Input: 1.05911
    2017-02-28 23:59:59.999989, Input: 1.05944
    2017-02-28 23:59:59.999989, Input: 1.05918
    2017-02-28 23:59:59.999989, Input: 1.05938
    2017-02-28 23:59:59.999989, Input: 1.05944
    2017-02-28 23:59:59.999989, Input: 1.05824
    2017-02-28 23:59:59.999989, Input: 1.05803
    2017-02-28 23:59:59.999989, Input: 1.05804
    2017-02-28 23:59:59.999989, Input: 1.05776
    2017-02-28 23:59:59.999989, Input: 1.05759
    2017-02-28 23:59:59.999989, Input: 1.0572
    2017-02-28 23:59:59.999989, Input: 1.05757
    2017-02-28 23:59:59.999989, Input: 1.0577
    2017-02-28 23:59:59.999989, Input: 1.0576
    2017-02-28 23:59:59.999989, Input: 1.05808
    2017-02-28 23:59:59.999989, Input: 1.05777
    2017-02-28 23:59:59.999989, Input: 1.05757
    2017-02-28 23:59:59.999989, Input: 1.0574
    2017-02-28 23:59:59.999989, Input: 1.05753
    2017-02-28 23:59:59.999989, Input: 1.05767
    2017-02-28 23:59:59.999989, Input: 1.05749
    2017-02-28 23:59:59.999989, Input: 1.05727
    2017-02-28 23:59:59.999989, Input: 1.0572
    2017-02-28 23:59:59.999989, Input: 1.05718
    2017-02-28 23:59:59.999989, Input: 1.05699
    2017-02-28 23:59:59.999989, Input: 1.05706
    2017-02-28 23:59:59.999989, Input: 1.05726
    2017-02-28 23:59:59.999989, Input: 1.05726
    2017-02-28 23:59:59.999989, Input: 1.05725
    2017-03-01 23:59:59.999989, SELL EXECUTED, Price: 1.05724, Cost: -10.57240, Comm 0.00
    2017-03-01 23:59:59.999989, Input: 1.05746
    2017-03-01 23:59:59.999989, Input2: 1.05746
    2017-03-01 23:59:59.999989, BUY CREATE, 1.05746
    2017-03-01 23:59:59.999989, Input: 1.05735
    2017-03-01 23:59:59.999989, Input: 1.05748
    2017-03-01 23:59:59.999989, Input: 1.05726
    2017-03-01 23:59:59.999989, Input: 1.05725
    2017-03-01 23:59:59.999989, Input: 1.05688
    2017-03-01 23:59:59.999989, Input: 1.05698
    2017-03-01 23:59:59.999989, Input: 1.05713
    2017-03-01 23:59:59.999989, Input: 1.05708
    2017-03-01 23:59:59.999989, Input: 1.05684
    2017-03-01 23:59:59.999989, Input: 1.0567
    2017-03-01 23:59:59.999989, Input: 1.05688
    2017-03-01 23:59:59.999989, Input: 1.05653
    2017-03-01 23:59:59.999989, Input: 1.05649
    2017-03-01 23:59:59.999989, Input: 1.05643
    2017-03-01 23:59:59.999989, Input: 1.05653
    2017-03-01 23:59:59.999989, Input: 1.0564
    2017-03-01 23:59:59.999989, Input: 1.05643
    2017-03-01 23:59:59.999989, Input: 1.05615
    2017-03-01 23:59:59.999989, Input: 1.05611
    2017-03-01 23:59:59.999989, Input: 1.05605
    2017-03-01 23:59:59.999989, Input: 1.05605
    2017-03-01 23:59:59.999989, Input: 1.05618
    2017-03-01 23:59:59.999989, Input: 1.05623
    2017-03-01 23:59:59.999989, Input: 1.05589
    2017-03-01 23:59:59.999989, Input: 1.05604
    2017-03-01 23:59:59.999989, Input: 1.05586
    2017-03-01 23:59:59.999989, Input: 1.05557
    2017-03-01 23:59:59.999989, Input: 1.05584
    2017-03-01 23:59:59.999989, Input: 1.05584
    2017-03-01 23:59:59.999989, Input: 1.05605
    2017-03-01 23:59:59.999989, Input: 1.05654
    2017-03-01 23:59:59.999989, Input: 1.05643
    2017-03-01 23:59:59.999989, Input: 1.05639
    2017-03-01 23:59:59.999989, Input: 1.05653
    2017-03-01 23:59:59.999989, Input: 1.05718
    2017-03-01 23:59:59.999989, Input: 1.05758
    2017-03-01 23:59:59.999989, Input: 1.05722
    2017-03-01 23:59:59.999989, Input: 1.05651
    2017-03-01 23:59:59.999989, Input: 1.05694
    2017-03-01 23:59:59.999989, Input: 1.05867
    2017-03-01 23:59:59.999989, Input: 1.05795
    2017-03-01 23:59:59.999989, Input: 1.05772
    2017-03-01 23:59:59.999989, Input: 1.05818
    2017-03-01 23:59:59.999989, Input: 1.05799
    2017-03-01 23:59:59.999989, Input: 1.05843
    2017-03-01 23:59:59.999989, Input: 1.05803
    2017-03-01 23:59:59.999989, Input: 1.05789
    2017-03-01 23:59:59.999989, Input: 1.05748
    2017-03-01 23:59:59.999989, Input: 1.05674
    2017-03-01 23:59:59.999989, Input: 1.05634
    2017-03-01 23:59:59.999989, Input: 1.05625
    2017-03-01 23:59:59.999989, Input: 1.05664
    2017-03-01 23:59:59.999989, Input: 1.05628
    2017-03-01 23:59:59.999989, Input: 1.05644
    2017-03-01 23:59:59.999989, Input: 1.05587
    2017-03-01 23:59:59.999989, Input: 1.05593
    2017-03-01 23:59:59.999989, Input: 1.05556
    2017-03-01 23:59:59.999989, Input: 1.05557
    2017-03-01 23:59:59.999989, Input: 1.05589
    2017-03-01 23:59:59.999989, Input: 1.05592
    2017-03-01 23:59:59.999989, Input: 1.05588
    2017-03-01 23:59:59.999989, Input: 1.05569
    2017-03-01 23:59:59.999989, Input: 1.0556
    2017-03-01 23:59:59.999989, Input: 1.05556
    2017-03-01 23:59:59.999989, Input: 1.05548
    2017-03-01 23:59:59.999989, Input: 1.05513
    2017-03-01 23:59:59.999989, Input: 1.05521
    2017-03-01 23:59:59.999989, Input: 1.05518
    2017-03-01 23:59:59.999989, Input: 1.05513
    2017-03-01 23:59:59.999989, Input: 1.05513
    2017-03-01 23:59:59.999989, Input: 1.05521
    2017-03-01 23:59:59.999989, Input: 1.0553
    2017-03-01 23:59:59.999989, Input: 1.05523
    2017-03-01 23:59:59.999989, Input: 1.05525
    2017-03-01 23:59:59.999989, Input: 1.05519
    2017-03-01 23:59:59.999989, Input: 1.05517
    2017-03-01 23:59:59.999989, Input: 1.05518
    2017-03-01 23:59:59.999989, Input: 1.05553
    2017-03-01 23:59:59.999989, Input: 1.05549
    2017-03-01 23:59:59.999989, Input: 1.05549
    2017-03-01 23:59:59.999989, Input: 1.05539
    2017-03-01 23:59:59.999989, Input: 1.05549
    2017-03-01 23:59:59.999989, Input: 1.05552
    2017-03-01 23:59:59.999989, Input: 1.05553
    2017-03-01 23:59:59.999989, Input: 1.05567
    2017-03-01 23:59:59.999989, Input: 1.05562
    2017-03-01 23:59:59.999989, Input: 1.05584
    2017-03-01 23:59:59.999989, Input: 1.05568
    2017-03-01 23:59:59.999989, Input: 1.05562
    2017-03-01 23:59:59.999989, Input: 1.05562
    2017-03-01 23:59:59.999989, Input: 1.05543
    2017-03-01 23:59:59.999989, Input: 1.05554
    2017-03-01 23:59:59.999989, Input: 1.05567
    2017-03-01 23:59:59.999989, Input: 1.0558
    2017-03-01 23:59:59.999989, Input: 1.05574
    2017-03-01 23:59:59.999989, Input: 1.05439
    2017-03-01 23:59:59.999989, Input: 1.05406
    2017-03-01 23:59:59.999989, Input: 1.05421
    2017-03-01 23:59:59.999989, Input: 1.05395
    2017-03-01 23:59:59.999989, Input: 1.0543
    2017-03-01 23:59:59.999989, Input: 1.05424
    2017-03-01 23:59:59.999989, Input: 1.05394
    2017-03-01 23:59:59.999989, Input: 1.05428
    2017-03-01 23:59:59.999989, Input: 1.05431
    2017-03-01 23:59:59.999989, Input: 1.05413
    2017-03-01 23:59:59.999989, Input: 1.05405
    2017-03-01 23:59:59.999989, Input: 1.05399
    2017-03-01 23:59:59.999989, Input: 1.05299
    2017-03-01 23:59:59.999989, Input: 1.05277
    2017-03-01 23:59:59.999989, Input: 1.0536
    2017-03-01 23:59:59.999989, Input: 1.05422
    2017-03-01 23:59:59.999989, Input: 1.05382
    2017-03-01 23:59:59.999989, Input: 1.05315
    2017-03-01 23:59:59.999989, Input: 1.05317
    2017-03-01 23:59:59.999989, Input: 1.05357
    2017-03-01 23:59:59.999989, Input: 1.05405
    2017-03-01 23:59:59.999989, Input: 1.05384
    2017-03-01 23:59:59.999989, Input: 1.05412
    2017-03-01 23:59:59.999989, Input: 1.05446
    2017-03-01 23:59:59.999989, Input: 1.05441
    2017-03-01 23:59:59.999989, Input: 1.05443
    2017-03-01 23:59:59.999989, Input: 1.05451
    2017-03-01 23:59:59.999989, Input: 1.05425
    2017-03-01 23:59:59.999989, Input: 1.05428
    2017-03-01 23:59:59.999989, Input: 1.05452
    2017-03-01 23:59:59.999989, Input: 1.05383
    2017-03-01 23:59:59.999989, Input: 1.05391
    2017-03-01 23:59:59.999989, Input: 1.05392
    2017-03-01 23:59:59.999989, Input: 1.05463
    2017-03-01 23:59:59.999989, Input: 1.05441
    2017-03-01 23:59:59.999989, Input: 1.05395
    2017-03-01 23:59:59.999989, Input: 1.05388
    2017-03-01 23:59:59.999989, Input: 1.05385
    2017-03-01 23:59:59.999989, Input: 1.05361
    2017-03-01 23:59:59.999989, Input: 1.05371
    2017-03-01 23:59:59.999989, Input: 1.05383
    2017-03-01 23:59:59.999989, Input: 1.05345
    2017-03-01 23:59:59.999989, Input: 1.0536
    2017-03-01 23:59:59.999989, Input: 1.05352
    2017-03-01 23:59:59.999989, Input: 1.05379
    2017-03-01 23:59:59.999989, Input: 1.0538
    2017-03-01 23:59:59.999989, Input: 1.05412
    2017-03-01 23:59:59.999989, Input: 1.05451
    2017-03-01 23:59:59.999989, Input: 1.0544
    2017-03-01 23:59:59.999989, Input: 1.05411
    2017-03-01 23:59:59.999989, Input: 1.05381
    2017-03-01 23:59:59.999989, Input: 1.05366
    2017-03-01 23:59:59.999989, Input: 1.05349
    2017-03-01 23:59:59.999989, Input: 1.05362
    2017-03-01 23:59:59.999989, Input: 1.05398
    2017-03-01 23:59:59.999989, Input: 1.05311
    2017-03-01 23:59:59.999989, Input: 1.0533
    2017-03-01 23:59:59.999989, Input: 1.05344
    2017-03-01 23:59:59.999989, Input: 1.05325
    2017-03-01 23:59:59.999989, Input: 1.05351
    2017-03-01 23:59:59.999989, Input: 1.0531
    2017-03-01 23:59:59.999989, Input: 1.05271
    2017-03-01 23:59:59.999989, Input: 1.05277
    2017-03-01 23:59:59.999989, Input: 1.05286
    2017-03-01 23:59:59.999989, Input: 1.05247
    2017-03-01 23:59:59.999989, Input: 1.05239
    2017-03-01 23:59:59.999989, Input: 1.05267
    2017-03-01 23:59:59.999989, Input: 1.05278
    2017-03-01 23:59:59.999989, Input: 1.05268
    2017-03-01 23:59:59.999989, Input: 1.05282
    2017-03-01 23:59:59.999989, Input: 1.05333
    2017-03-01 23:59:59.999989, Input: 1.05263
    2017-03-01 23:59:59.999989, Input: 1.05259
    2017-03-01 23:59:59.999989, Input: 1.05288
    2017-03-01 23:59:59.999989, Input: 1.05327
    2017-03-01 23:59:59.999989, Input: 1.05323
    2017-03-01 23:59:59.999989, Input: 1.05215
    2017-03-01 23:59:59.999989, Input: 1.05222
    2017-03-01 23:59:59.999989, Input: 1.0522
    2017-03-01 23:59:59.999989, Input: 1.05211
    2017-03-01 23:59:59.999989, Input: 1.0521
    2017-03-01 23:59:59.999989, Input: 1.05218
    2017-03-01 23:59:59.999989, Input: 1.05247
    2017-03-01 23:59:59.999989, Input: 1.0525
    2017-03-01 23:59:59.999989, Input: 1.05237
    2017-03-01 23:59:59.999989, Input: 1.05232
    2017-03-01 23:59:59.999989, Input: 1.0525
    2017-03-01 23:59:59.999989, Input: 1.05252
    2017-03-01 23:59:59.999989, Input: 1.05241
    2017-03-01 23:59:59.999989, Input: 1.05251
    2017-03-01 23:59:59.999989, Input: 1.05273
    2017-03-01 23:59:59.999989, Input: 1.05372
    2017-03-01 23:59:59.999989, Input: 1.05347
    2017-03-01 23:59:59.999989, Input: 1.05333
    2017-03-01 23:59:59.999989, Input: 1.05322
    2017-03-01 23:59:59.999989, Input: 1.05329
    2017-03-01 23:59:59.999989, Input: 1.054
    2017-03-01 23:59:59.999989, Input: 1.05372
    2017-03-01 23:59:59.999989, Input: 1.05446
    2017-03-01 23:59:59.999989, Input: 1.05436
    2017-03-01 23:59:59.999989, Input: 1.05394
    2017-03-01 23:59:59.999989, Input: 1.05421
    2017-03-01 23:59:59.999989, Input: 1.05445
    2017-03-01 23:59:59.999989, Input: 1.05566
    2017-03-01 23:59:59.999989, Input: 1.05511
    2017-03-01 23:59:59.999989, Input: 1.05558
    2017-03-01 23:59:59.999989, Input: 1.05586
    2017-03-01 23:59:59.999989, Input: 1.0555
    2017-03-01 23:59:59.999989, Input: 1.05511
    2017-03-01 23:59:59.999989, Input: 1.05502
    2017-03-01 23:59:59.999989, Input: 1.05587
    2017-03-01 23:59:59.999989, Input: 1.05558
    2017-03-01 23:59:59.999989, Input: 1.05575
    2017-03-01 23:59:59.999989, Input: 1.05621
    2017-03-01 23:59:59.999989, Input: 1.05595
    2017-03-01 23:59:59.999989, Input: 1.05681
    2017-03-01 23:59:59.999989, Input: 1.05686
    2017-03-01 23:59:59.999989, Input: 1.05661
    2017-03-01 23:59:59.999989, Input: 1.05675
    2017-03-01 23:59:59.999989, Input: 1.05633
    2017-03-01 23:59:59.999989, Input: 1.05644
    2017-03-01 23:59:59.999989, Input: 1.05699
    2017-03-01 23:59:59.999989, Input: 1.05688
    2017-03-01 23:59:59.999989, Input: 1.05693
    2017-03-01 23:59:59.999989, Input: 1.05655
    2017-03-01 23:59:59.999989, Input: 1.05664
    2017-03-01 23:59:59.999989, Input: 1.05665
    2017-03-01 23:59:59.999989, Input: 1.05647
    2017-03-01 23:59:59.999989, Input: 1.05634
    2017-03-01 23:59:59.999989, Input: 1.05663
    2017-03-01 23:59:59.999989, Input: 1.05669
    2017-03-01 23:59:59.999989, Input: 1.05631
    2017-03-01 23:59:59.999989, Input: 1.05635
    2017-03-01 23:59:59.999989, Input: 1.05645
    2017-03-01 23:59:59.999989, Input: 1.05634
    2017-03-01 23:59:59.999989, Input: 1.05635
    2017-03-01 23:59:59.999989, Input: 1.0563
    2017-03-01 23:59:59.999989, Input: 1.0563
    2017-03-01 23:59:59.999989, Input: 1.05651
    2017-03-01 23:59:59.999989, Input: 1.05698
    2017-03-01 23:59:59.999989, Input: 1.05651
    2017-03-01 23:59:59.999989, Input: 1.05701
    2017-03-01 23:59:59.999989, Input: 1.05672
    2017-03-01 23:59:59.999989, Input: 1.05664
    2017-03-01 23:59:59.999989, Input: 1.0565
    2017-03-01 23:59:59.999989, Input: 1.05594
    2017-03-01 23:59:59.999989, Input: 1.05573
    2017-03-01 23:59:59.999989, Input: 1.05555
    2017-03-01 23:59:59.999989, Input: 1.05518
    2017-03-01 23:59:59.999989, Input: 1.05496
    2017-03-01 23:59:59.999989, Input: 1.05496
    2017-03-01 23:59:59.999989, Input: 1.05479
    2017-03-01 23:59:59.999989, Input: 1.055
    2017-03-01 23:59:59.999989, Input: 1.05454
    2017-03-01 23:59:59.999989, Input: 1.05475
    2017-03-01 23:59:59.999989, Input: 1.05439
    2017-03-01 23:59:59.999989, Input: 1.05498
    2017-03-01 23:59:59.999989, Input: 1.05506
    2017-03-01 23:59:59.999989, Input: 1.055
    2017-03-01 23:59:59.999989, Input: 1.05497
    2017-03-01 23:59:59.999989, Input: 1.05526
    2017-03-01 23:59:59.999989, Input: 1.05495
    2017-03-01 23:59:59.999989, Input: 1.05481
    2017-03-01 23:59:59.999989, Input: 1.0549
    2017-03-01 23:59:59.999989, Input: 1.05496
    2017-03-01 23:59:59.999989, Input: 1.05495
    2017-03-01 23:59:59.999989, Input: 1.0551
    2017-03-01 23:59:59.999989, Input: 1.05457
    2017-03-01 23:59:59.999989, Input: 1.0546
    2017-03-01 23:59:59.999989, Input: 1.0545
    2017-03-01 23:59:59.999989, Input: 1.05441
    2017-03-01 23:59:59.999989, Input: 1.05439
    2017-03-01 23:59:59.999989, Input: 1.05456
    2017-03-01 23:59:59.999989, Input: 1.05469
    2017-03-01 23:59:59.999989, Input: 1.05455
    2017-03-01 23:59:59.999989, Input: 1.05449
    2017-03-01 23:59:59.999989, Input: 1.05445
    2017-03-01 23:59:59.999989, Input: 1.05444
    2017-03-01 23:59:59.999989, Input: 1.05446
    2017-03-01 23:59:59.999989, Input: 1.05459
    2017-03-01 23:59:59.999989, Input: 1.05461
    2017-03-01 23:59:59.999989, Input: 1.05498
    2017-03-01 23:59:59.999989, Input: 1.05498
    2017-03-01 23:59:59.999989, Input: 1.05497
    2017-03-01 23:59:59.999989, Input: 1.05482
    2017-03-01 23:59:59.999989, Input: 1.05481
    2017-03-01 23:59:59.999989, Input: 1.05493
    2017-03-01 23:59:59.999989, Input: 1.05488
    2017-03-01 23:59:59.999989, Input: 1.0549
    2017-03-01 23:59:59.999989, Input: 1.05497
    2017-03-01 23:59:59.999989, Input: 1.05504
    2017-03-01 23:59:59.999989, Input: 1.05505
    2017-03-02 23:59:59.999989, BUY EXECUTED, Price: 1.05500, Cost: -10.57240, Comm 0.00
    2017-03-02 23:59:59.999989, BUY EXECUTED, Price: 1.05500, Cost: 10.55000, Comm 0.00
    2017-03-02 23:59:59.999989, OPERATION PROFIT, GROSS 0.02, NET 0.02
    2017-03-02 23:59:59.999989, Input: 1.05455
    2017-03-02 23:59:59.999989, Input2: 1.05455
    2017-03-02 23:59:59.999989, SELL CREATE, 1.05455
    2017-03-02 23:59:59.999989, Input: 1.0542
    2017-03-02 23:59:59.999989, Input: 1.0539
    2017-03-02 23:59:59.999989, Input: 1.05413
    2017-03-02 23:59:59.999989, Input: 1.05438
    2017-03-02 23:59:59.999989, Input: 1.05439
    2017-03-02 23:59:59.999989, Input: 1.05392
    2017-03-02 23:59:59.999989, Input: 1.05353
    2017-03-02 23:59:59.999989, Input: 1.05362
    2017-03-02 23:59:59.999989, Input: 1.05375
    2017-03-02 23:59:59.999989, Input: 1.05365
    2017-03-02 23:59:59.999989, Input: 1.05359
    2017-03-02 23:59:59.999989, Input: 1.05323
    2017-03-02 23:59:59.999989, Input: 1.05294
    2017-03-02 23:59:59.999989, Input: 1.05324
    2017-03-02 23:59:59.999989, Input: 1.05353
    2017-03-02 23:59:59.999989, Input: 1.05353
    2017-03-02 23:59:59.999989, Input: 1.05361
    2017-03-02 23:59:59.999989, Input: 1.05348
    2017-03-02 23:59:59.999989, Input: 1.05357
    2017-03-02 23:59:59.999989, Input: 1.05332
    2017-03-02 23:59:59.999989, Input: 1.05375
    2017-03-02 23:59:59.999989, Input: 1.05392
    2017-03-02 23:59:59.999989, Input: 1.05419
    2017-03-02 23:59:59.999989, Input: 1.05442
    2017-03-02 23:59:59.999989, Input: 1.05409
    2017-03-02 23:59:59.999989, Input: 1.05373
    2017-03-02 23:59:59.999989, Input: 1.05416
    2017-03-02 23:59:59.999989, Input: 1.05401
    2017-03-02 23:59:59.999989, Input: 1.05383
    2017-03-02 23:59:59.999989, Input: 1.05384
    2017-03-02 23:59:59.999989, Input: 1.05386
    2017-03-02 23:59:59.999989, Input: 1.05365
    2017-03-02 23:59:59.999989, Input: 1.05342
    2017-03-02 23:59:59.999989, Input: 1.05339
    2017-03-02 23:59:59.999989, Input: 1.0534
    2017-03-02 23:59:59.999989, Input: 1.0529
    2017-03-02 23:59:59.999989, Input: 1.05288
    2017-03-02 23:59:59.999989, Input: 1.05299
    2017-03-02 23:59:59.999989, Input: 1.05312
    2017-03-02 23:59:59.999989, Input: 1.05315
    2017-03-02 23:59:59.999989, Input: 1.0531
    2017-03-02 23:59:59.999989, Input: 1.05288
    2017-03-02 23:59:59.999989, Input: 1.05289
    2017-03-02 23:59:59.999989, Input: 1.05286
    2017-03-02 23:59:59.999989, Input: 1.05285
    2017-03-02 23:59:59.999989, Input: 1.053
    2017-03-02 23:59:59.999989, Input: 1.05298
    2017-03-02 23:59:59.999989, Input: 1.053
    2017-03-02 23:59:59.999989, Input: 1.05319
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05325
    2017-03-02 23:59:59.999989, Input: 1.05316
    2017-03-02 23:59:59.999989, Input: 1.05311
    2017-03-02 23:59:59.999989, Input: 1.05311
    2017-03-02 23:59:59.999989, Input: 1.05315
    2017-03-02 23:59:59.999989, Input: 1.0534
    2017-03-02 23:59:59.999989, Input: 1.05324
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05298
    2017-03-02 23:59:59.999989, Input: 1.05299
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05316
    2017-03-02 23:59:59.999989, Input: 1.05318
    2017-03-02 23:59:59.999989, Input: 1.05305
    2017-03-02 23:59:59.999989, Input: 1.05318
    2017-03-02 23:59:59.999989, Input: 1.05326
    2017-03-02 23:59:59.999989, Input: 1.05323
    2017-03-02 23:59:59.999989, Input: 1.05326
    2017-03-02 23:59:59.999989, Input: 1.05329
    2017-03-02 23:59:59.999989, Input: 1.05323
    2017-03-02 23:59:59.999989, Input: 1.05304
    2017-03-02 23:59:59.999989, Input: 1.05311
    2017-03-02 23:59:59.999989, Input: 1.05319
    2017-03-02 23:59:59.999989, Input: 1.05326
    2017-03-02 23:59:59.999989, Input: 1.0532
    2017-03-02 23:59:59.999989, Input: 1.0532
    2017-03-02 23:59:59.999989, Input: 1.05322
    2017-03-02 23:59:59.999989, Input: 1.05317
    2017-03-02 23:59:59.999989, Input: 1.05305
    2017-03-02 23:59:59.999989, Input: 1.05306
    2017-03-02 23:59:59.999989, Input: 1.05315
    2017-03-02 23:59:59.999989, Input: 1.05305
    2017-03-02 23:59:59.999989, Input: 1.05317
    2017-03-02 23:59:59.999989, Input: 1.05323
    2017-03-02 23:59:59.999989, Input: 1.05331
    2017-03-02 23:59:59.999989, Input: 1.05355
    2017-03-02 23:59:59.999989, Input: 1.05335
    2017-03-02 23:59:59.999989, Input: 1.05327
    2017-03-02 23:59:59.999989, Input: 1.05313
    2017-03-02 23:59:59.999989, Input: 1.05302
    2017-03-02 23:59:59.999989, Input: 1.05312
    2017-03-02 23:59:59.999989, Input: 1.05303
    2017-03-02 23:59:59.999989, Input: 1.05277
    2017-03-02 23:59:59.999989, Input: 1.05259
    2017-03-02 23:59:59.999989, Input: 1.05264
    2017-03-02 23:59:59.999989, Input: 1.0526
    2017-03-02 23:59:59.999989, Input: 1.05255
    2017-03-02 23:59:59.999989, Input: 1.05306
    2017-03-02 23:59:59.999989, Input: 1.05294
    2017-03-02 23:59:59.999989, Input: 1.05305
    2017-03-02 23:59:59.999989, Input: 1.05305
    2017-03-02 23:59:59.999989, Input: 1.05324
    2017-03-02 23:59:59.999989, Input: 1.05357
    2017-03-02 23:59:59.999989, Input: 1.05337
    2017-03-02 23:59:59.999989, Input: 1.05341
    2017-03-02 23:59:59.999989, Input: 1.05392
    2017-03-02 23:59:59.999989, Input: 1.05409
    2017-03-02 23:59:59.999989, Input: 1.05386
    2017-03-02 23:59:59.999989, Input: 1.05374
    2017-03-02 23:59:59.999989, Input: 1.05353
    2017-03-02 23:59:59.999989, Input: 1.05359
    2017-03-02 23:59:59.999989, Input: 1.0535
    2017-03-02 23:59:59.999989, Input: 1.05352
    2017-03-02 23:59:59.999989, Input: 1.05388
    2017-03-02 23:59:59.999989, Input: 1.05443
    2017-03-02 23:59:59.999989, Input: 1.05441
    2017-03-02 23:59:59.999989, Input: 1.0542
    2017-03-02 23:59:59.999989, Input: 1.05421
    2017-03-02 23:59:59.999989, Input: 1.05415
    2017-03-02 23:59:59.999989, Input: 1.05415
    2017-03-02 23:59:59.999989, Input: 1.05383
    2017-03-02 23:59:59.999989, Input: 1.05348
    2017-03-02 23:59:59.999989, Input: 1.05334
    2017-03-02 23:59:59.999989, Input: 1.05334
    2017-03-02 23:59:59.999989, Input: 1.0528
    2017-03-02 23:59:59.999989, Input: 1.05242
    2017-03-02 23:59:59.999989, Input: 1.05257
    2017-03-02 23:59:59.999989, Input: 1.05269
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05254
    2017-03-02 23:59:59.999989, Input: 1.05285
    2017-03-02 23:59:59.999989, Input: 1.05309
    2017-03-02 23:59:59.999989, Input: 1.05273
    2017-03-02 23:59:59.999989, Input: 1.05239
    2017-03-02 23:59:59.999989, Input: 1.05299
    2017-03-02 23:59:59.999989, Input: 1.05273
    2017-03-02 23:59:59.999989, Input: 1.05285
    2017-03-02 23:59:59.999989, Input: 1.05308
    2017-03-02 23:59:59.999989, Input: 1.05328
    2017-03-02 23:59:59.999989, Input: 1.05314
    2017-03-02 23:59:59.999989, Input: 1.05307
    2017-03-02 23:59:59.999989, Input: 1.05273
    2017-03-02 23:59:59.999989, Input: 1.05258
    2017-03-02 23:59:59.999989, Input: 1.05242
    2017-03-02 23:59:59.999989, Input: 1.05228
    2017-03-02 23:59:59.999989, Input: 1.05251
    2017-03-02 23:59:59.999989, Input: 1.05241
    2017-03-02 23:59:59.999989, Input: 1.05282
    2017-03-02 23:59:59.999989, Input: 1.05284
    2017-03-02 23:59:59.999989, Input: 1.05288
    2017-03-02 23:59:59.999989, Input: 1.05226
    2017-03-02 23:59:59.999989, Input: 1.05234
    2017-03-02 23:59:59.999989, Input: 1.05232
    2017-03-02 23:59:59.999989, Input: 1.05222
    2017-03-02 23:59:59.999989, Input: 1.05192
    2017-03-02 23:59:59.999989, Input: 1.05165
    2017-03-02 23:59:59.999989, Input: 1.05109
    2017-03-02 23:59:59.999989, Input: 1.05086
    2017-03-02 23:59:59.999989, Input: 1.05126
    2017-03-02 23:59:59.999989, Input: 1.05113
    2017-03-02 23:59:59.999989, Input: 1.05116
    2017-03-02 23:59:59.999989, Input: 1.05156
    2017-03-02 23:59:59.999989, Input: 1.05172
    2017-03-02 23:59:59.999989, Input: 1.0518
    2017-03-02 23:59:59.999989, Input: 1.05198
    2017-03-02 23:59:59.999989, Input: 1.05194
    2017-03-02 23:59:59.999989, Input: 1.05163
    2017-03-02 23:59:59.999989, Input: 1.05128
    2017-03-02 23:59:59.999989, Input: 1.05142
    2017-03-02 23:59:59.999989, Input: 1.05157
    2017-03-02 23:59:59.999989, Input: 1.05158
    2017-03-02 23:59:59.999989, Input: 1.05163
    2017-03-02 23:59:59.999989, Input: 1.05111
    2017-03-02 23:59:59.999989, Input: 1.0511
    2017-03-02 23:59:59.999989, Input: 1.05146
    2017-03-02 23:59:59.999989, Input: 1.05158
    2017-03-02 23:59:59.999989, Input: 1.05143
    2017-03-02 23:59:59.999989, Input: 1.05137
    2017-03-02 23:59:59.999989, Input: 1.0507
    2017-03-02 23:59:59.999989, Input: 1.05026
    2017-03-02 23:59:59.999989, Input: 1.05029
    2017-03-02 23:59:59.999989, Input: 1.05019
    2017-03-02 23:59:59.999989, Input: 1.05035
    2017-03-02 23:59:59.999989, Input: 1.04997
    2017-03-02 23:59:59.999989, Input: 1.05086
    2017-03-02 23:59:59.999989, Input: 1.05075
    2017-03-02 23:59:59.999989, Input: 1.0508
    2017-03-02 23:59:59.999989, Input: 1.05043
    2017-03-02 23:59:59.999989, Input: 1.05067
    2017-03-02 23:59:59.999989, Input: 1.05047
    2017-03-02 23:59:59.999989, Input: 1.05086
    2017-03-02 23:59:59.999989, Input: 1.0511
    2017-03-02 23:59:59.999989, Input: 1.05158
    2017-03-02 23:59:59.999989, Input: 1.05129
    2017-03-02 23:59:59.999989, Input: 1.05149
    2017-03-02 23:59:59.999989, Input: 1.0512
    2017-03-02 23:59:59.999989, Input: 1.05137
    2017-03-02 23:59:59.999989, Input: 1.05192
    2017-03-02 23:59:59.999989, Input: 1.05194
    2017-03-02 23:59:59.999989, Input: 1.05232
    2017-03-02 23:59:59.999989, Input: 1.05202
    2017-03-02 23:59:59.999989, Input: 1.05244
    2017-03-02 23:59:59.999989, Input: 1.05243
    2017-03-02 23:59:59.999989, Input: 1.05249
    2017-03-02 23:59:59.999989, Input: 1.05228
    2017-03-02 23:59:59.999989, Input: 1.05248
    2017-03-02 23:59:59.999989, Input: 1.05231
    2017-03-02 23:59:59.999989, Input: 1.05202
    2017-03-02 23:59:59.999989, Input: 1.05207
    2017-03-02 23:59:59.999989, Input: 1.05177
    2017-03-02 23:59:59.999989, Input: 1.05153
    2017-03-02 23:59:59.999989, Input: 1.05147
    2017-03-02 23:59:59.999989, Input: 1.05131
    2017-03-02 23:59:59.999989, Input: 1.05135
    2017-03-02 23:59:59.999989, Input: 1.05162
    2017-03-02 23:59:59.999989, Input: 1.05122
    2017-03-02 23:59:59.999989, Input: 1.05108
    2017-03-02 23:59:59.999989, Input: 1.05105
    2017-03-02 23:59:59.999989, Input: 1.05081
    2017-03-02 23:59:59.999989, Input: 1.05089
    2017-03-02 23:59:59.999989, Input: 1.05097
    2017-03-02 23:59:59.999989, Input: 1.05077
    2017-03-02 23:59:59.999989, Input: 1.05072
    2017-03-02 23:59:59.999989, Input: 1.05074
    2017-03-02 23:59:59.999989, Input: 1.05051
    2017-03-02 23:59:59.999989, Input: 1.05058
    2017-03-02 23:59:59.999989, Input: 1.05062
    2017-03-02 23:59:59.999989, Input: 1.05037
    2017-03-02 23:59:59.999989, Input: 1.05036
    2017-03-02 23:59:59.999989, Input: 1.05084
    2017-03-02 23:59:59.999989, Input: 1.05079
    2017-03-02 23:59:59.999989, Input: 1.05082
    2017-03-02 23:59:59.999989, Input: 1.05037
    2017-03-02 23:59:59.999989, Input: 1.05033
    2017-03-02 23:59:59.999989, Input: 1.05031
    2017-03-02 23:59:59.999989, Input: 1.05011
    2017-03-02 23:59:59.999989, Input: 1.05032
    2017-03-02 23:59:59.999989, Input: 1.05048
    2017-03-02 23:59:59.999989, Input: 1.05033
    2017-03-02 23:59:59.999989, Input: 1.04988
    2017-03-02 23:59:59.999989, Input: 1.04983
    2017-03-02 23:59:59.999989, Input: 1.04984
    2017-03-02 23:59:59.999989, Input: 1.0497
    2017-03-02 23:59:59.999989, Input: 1.04958
    2017-03-02 23:59:59.999989, Input: 1.04974
    2017-03-02 23:59:59.999989, Input: 1.04987
    2017-03-02 23:59:59.999989, Input: 1.04989
    2017-03-02 23:59:59.999989, Input: 1.04977
    2017-03-02 23:59:59.999989, Input: 1.05005
    2017-03-02 23:59:59.999989, Input: 1.05008
    2017-03-02 23:59:59.999989, Input: 1.05038
    2017-03-02 23:59:59.999989, Input: 1.05019
    2017-03-02 23:59:59.999989, Input: 1.05049
    2017-03-02 23:59:59.999989, Input: 1.05064
    2017-03-02 23:59:59.999989, Input: 1.05034
    2017-03-02 23:59:59.999989, Input: 1.05038
    2017-03-02 23:59:59.999989, Input: 1.05052
    2017-03-02 23:59:59.999989, Input: 1.05059
    2017-03-02 23:59:59.999989, Input: 1.05063
    2017-03-02 23:59:59.999989, Input: 1.05087
    2017-03-02 23:59:59.999989, Input: 1.05066
    2017-03-02 23:59:59.999989, Input: 1.05068
    2017-03-02 23:59:59.999989, Input: 1.05064
    2017-03-02 23:59:59.999989, Input: 1.05082
    2017-03-02 23:59:59.999989, Input: 1.05075
    2017-03-02 23:59:59.999989, Input: 1.05059
    2017-03-02 23:59:59.999989, Input: 1.05057
    2017-03-02 23:59:59.999989, Input: 1.05051
    2017-03-02 23:59:59.999989, Input: 1.05051
    2017-03-02 23:59:59.999989, Input: 1.05062
    2017-03-02 23:59:59.999989, Input: 1.05063
    2017-03-02 23:59:59.999989, Input: 1.05065
    2017-03-02 23:59:59.999989, Input: 1.05068
    2017-03-02 23:59:59.999989, Input: 1.05059
    2017-03-02 23:59:59.999989, Input: 1.05015
    2017-03-02 23:59:59.999989, Input: 1.0505
    2017-03-02 23:59:59.999989, Input: 1.05055
    2017-03-02 23:59:59.999989, Input: 1.05062
    2017-03-02 23:59:59.999989, Input: 1.05064
    2017-03-02 23:59:59.999989, Input: 1.05083
    2017-03-02 23:59:59.999989, Input: 1.05053
    2017-03-02 23:59:59.999989, Input: 1.05055
    2017-03-02 23:59:59.999989, Input: 1.05071
    2017-03-02 23:59:59.999989, Input: 1.05081
    2017-03-02 23:59:59.999989, Input: 1.05066
    2017-03-02 23:59:59.999989, Input: 1.05062
    2017-03-03 23:59:59.999989, SELL EXECUTED, Price: 1.05060, Cost: 10.55000, Comm 0.00
    2017-03-03 23:59:59.999989, SELL EXECUTED, Price: 1.05060, Cost: -10.50600, Comm 0.00
    2017-03-03 23:59:59.999989, OPERATION PROFIT, GROSS -0.04, NET -0.04
    2017-03-03 23:59:59.999989, Input: 1.0505
    2017-03-03 23:59:59.999989, Input2: 1.0505
    2017-03-03 23:59:59.999989, Input: 1.0506
    

    I'm just confused. Thx for looking into it.



  • @kolten looks like you have orders executed on the the daily timeframe. I am not a pro in intraday exercises, but timestamps in the output look weird - the same time for each bar. It seems to me that data import was done incorrectly. Probably you need to specify timeframe parameter for data feed.



  • @ab_trader Thx, I did not realize the default timeformat was days. When I changed it to minutes it works as expected.



  • @ab_trader said in How do I handle order execution time:

    > 2015-10-16 23:59:59.999989, BUY CREATE, 203.27000
    > 2015-10-19 23:59:59.999989, BUY EXECUTED, Price: 202.50000, Cost: 2025.00000, Comm 0.00
    

    Is the notification about "executed" not asynchronous? In the output data there seams to be 3 day difference on when the order was issued and when it was executed, also there is a large change in price between these to points in time?



  • @kolten Ok now I see, it was a weekend and it opened at the price.


  • administrators

    The default for notifications are accumulated and delivered before next is called. They are not delayed in any case with regards to what you see.

    The design was so chosen to keep things in a straight line and users not having to care about asynchronous or threaded events.

    In the most recent versions you can change that behavior if you wish by passing quicknotify=True to cerebro.

    See Docs - Cerebro


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.