How do I adjust it so it make a trade only once every week based on the data? 

I'm using this from the sample script. Here are some lines.  

       # create a 5 day exponential moving average
        self.fast = self.EMA(stock , 5, Resolution.Daily);

        # create a 3 day exponential moving average
        self.slow = self.EMA(stock , 3, Resolution.Daily);

 

# only once per day
        if self.previous is not None and self.previous.date() == self.Time.date():
            return