specifying a symbol for buy_new_highs public script

When I specify one symbol (e.g. SPY) for the public buy_new_highs script, there are no trades. Why?

Comments

  • shayneshayne Posts: 70
    edited February 2017

    ChessPoke -

    There could be a couple of directly related issues -

    • did it meet the symbol qualifications:
        @classmethod
        def is_symbol_qualified(cls, symbol, md, service, account):
            if md.stat.avol < 100000:
                return False
            else:
                return True
    
    
    I assume yes
    
    • depending on the date, it would need to meet these conditions:
            ### Entry
            if ( new_high 
                 and self.stage == 0
                 and service.system_time > self.start_time 
                 and service.system_time > ( self.last_high_time + service.time_interval( minutes=10 ) ) 
                 and self.pullback < self.stop_tail ):
    
    

    Make sense? We would need to know the exact day or days in question.

  • ChessPokerChessPoker Posts: 2
    edited February 2017

    I ran a backtest for SPY for February 2017 and there are no trades. I did this two ways. Once by selecting 'Use Specific Symbols' and specifying SPY, and the other way was by modifying is_symbol_qualified:

    @classmethod
        def is_symbol_qualified(cls, symbol, md, service, account):
            if symbol!='SPY' or md.stat.avol < 100000:
                return False
            else:
                return True
    

    Neither method yielded any trades. It seems like SPY is not in the data feed.

Sign In or Register to comment.