condition parameter adjustment <p>I try to use 'IF' in python in order to achieve the algorithm that can automatically ajust the value of a parameter in 'IF' according to some stock trasactions. </p> <pre><code>if self.sellcount==0 and int(time.time())-self.programstarttime&gt;600: if cur_sum/total_sum&gt;0.15: Other Code else: if cur_sum/total_sum&gt;0.35: Other Code </code></pre> <p>I try to achieve that if my algorithm do not sell any stock for 10 minutes, the algorithm can automatically change the condition from 0.35 to 0.15. However, the code above will change from 0.15 to 0.35 after selling stocks for one time. I want the code to keep 0.15 after selling stocks for one time.</p>