@@ -125,26 +125,29 @@ def main():
125125 window ['SLL' ].update (visible = False )
126126
127127 # GLOBAL VARIABLES
128- api_key = values ['APIKEY' ]
129- api_secret = values ['APISECRET' ]
130- tz_cont = values ['CONTINENT' ]
131- tz_city = values ['CITY' ]
132- inp_start_time = values ['STARTTIME' ]
133- inp_working_ival = values ['WORKINGINTERVAL' ]
134- tp_choice = values ['TPCHOICE' ]
135- sl_choice = values ['SLCHOICE' ]
136- oco_choice = values ['OCOCHOICE' ]
137- email_choice = values ['EMAILCHOICE' ]
138- sender_email = values ['SENDEREMAIL' ]
139- password = values ['PASSWORD' ]
140- receiver_email = values ['RECEIVEREMAIL' ]
141- inp_oco_profit_pct = values ['OCOTP' ]
142- inp_oco_sl_pct = values ['OCOSL' ]
143- inp_oco_lmt_pct = values ['OCOLL' ]
144- inp_tp_stop_pct = values ['TPSL' ]
145- inp_tp_lmt_pct = values ['TPL' ]
146- inp_sl_stop_pct = values ['SL' ]
147- inp_sl_lmt_pct = values ['SLL' ]
128+ try :
129+ api_key = values ['APIKEY' ]
130+ api_secret = values ['APISECRET' ]
131+ tz_cont = values ['CONTINENT' ]
132+ tz_city = values ['CITY' ]
133+ inp_start_time = values ['STARTTIME' ]
134+ inp_working_ival = values ['WORKINGINTERVAL' ]
135+ tp_choice = values ['TPCHOICE' ]
136+ sl_choice = values ['SLCHOICE' ]
137+ oco_choice = values ['OCOCHOICE' ]
138+ email_choice = values ['EMAILCHOICE' ]
139+ sender_email = values ['SENDEREMAIL' ]
140+ password = values ['PASSWORD' ]
141+ receiver_email = values ['RECEIVEREMAIL' ]
142+ inp_oco_profit_pct = values ['OCOTP' ]
143+ inp_oco_sl_pct = values ['OCOSL' ]
144+ inp_oco_lmt_pct = values ['OCOLL' ]
145+ inp_tp_stop_pct = values ['TPSL' ]
146+ inp_tp_lmt_pct = values ['TPL' ]
147+ inp_sl_stop_pct = values ['SL' ]
148+ inp_sl_lmt_pct = values ['SLL' ]
149+ except TypeError :
150+ pass
148151
149152 # show order fields according to radio buttons
150153 if tp_choice :
0 commit comments