For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

How can I use my strategy

  • I've backtested it across multiple stocks and in bull and bear market and it seems pretty good now I wanna paper trade it, I made it write the last order for a stock (Buy or sell) to a csv but the problem is it could be a sell signal but from 2 weeks ago, and I can't limit the date from the data feed because I need exponential averages

    my questions are
    is there a way I could call the signal my strategy produces for today for example so I can send it to my csv
    or simply how can I get the signals any other way for today

            if not self.position:
                if self.buysell_sig < 0:
                    df2.loc[symbol] = ['BUY']
                    self.order =
                if self.buysell_sig > 0:
                    df2.loc[symbol] = ['SELL']
                    self.order = self.sell()

    this is what I'm doing right now, it gets the last order so it can be a buy signal that never closed from a month ago

  • Check the date in the next() and issue signal only for date you need.

Log in to reply