Nov-16-2018, 09:28 AM
if ((SPREAD >= 2 and SPREAD < 20) and not Long_On_Spread): Long_On_Spread = True print ('Buy Mini - Sell Mega') elif ((SPREAD <=-2 and SPREAD > 20) and not Shorting_Spread): Shorting_Spread = True print ('Sell Mini - Buy Mega') elif (abs(SPREAD) < 0.1 and (Long_On_Spread or Shorting_Spread)): Long_On_Spread = False Shorting_Spread = False print ('Exit Position')The second and third condition is not working. While the condition is satisfying.