Re: holding if/else condition in live bitcoin trading Python

2016-08-03 Thread honeygne
On Tuesday, August 2, 2016 at 9:42:03 PM UTC+5:30, Steven D'Aprano wrote: > On Tue, 2 Aug 2016 07:14 pm, Arshpreet Singh wrote: > > > is there any approach I can go with so auto_order_buy() auto_order_sell() > > function only executed once? > > Take them out of the while loop. yes but Bitfinex is

Re: holding if/else condition in live bitcoin trading Python

2016-08-02 Thread Steven D'Aprano
On Tue, 2 Aug 2016 07:14 pm, Arshpreet Singh wrote: > is there any approach I can go with so auto_order_buy() auto_order_sell() > function only executed once? Take them out of the while loop. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things go

holding if/else condition in live bitcoin trading Python

2016-08-02 Thread Arshpreet Singh
I am making a function that is running in while loop and if/else statements make decisions on based on the condition: here is code: def main_call(): while True: l0_0 = getDiff('btcusd',8) l1_0 = np.tanh(l0_0*0.8446488687) l1_1 = np.tanh(l0_0*-0.5674069006) l1