MAINT: Use bitwise flags to help order cases easier to follow.
MAINT: Use bitwise flags to help order cases easier to follow.

Instead of nesting order direction and related stop and limit logic,
derive a bitwise mask from the combination of order configurations
and use the mask as a 'switch'.

sketchytechky/zipline,dhruvparamhans/zipline,jimgoo/zipline-fork,euri10/zipline,kmather73/zipline,alphaBenj/zipline,michaeljohnbennett/zipline,humdings/zipline,joequant/zipline,gwulfs/zipline,mattcaldwell/zipline,dhruvparamhans/zipline,grundgruen/zipline,davidastephens/zipline,gwulfs/zipline,enigmampc/catalyst,keir-rex/zipline,humdings/zipline,iamkingmaker/zipline,magne-max/zipline-ja,quantopian/zipline,StratsOn/zipline,mattcaldwell/zipline,otmaneJai/Zipline,semio/zipline,YuepengGuo/zipline,enigmampc/catalyst,morrisonwudi/zipline,grundgruen/zipline,AlirezaShahabi/zipline,dmitriz/zipline,kmather73/zipline,umuzungu/zipline,aajtodd/zipline,aajtodd/zipline,sketchytechky/zipline,magne-max/zipline-ja,florentchandelier/zipline,YuepengGuo/zipline,bartosh/zipline,dkushner/zipline,Scapogo/zipline,cmorgan/zipline,alphaBenj/zipline,MonoCloud/zipline,morrisonwudi/zipline,ChinaQuants/zipline,chrjxj/zipline,MonoCloud/zipline,quantopian/zipline,joequant/zipline,erikness/AlephOne,euri10/zipline,otmaneJai/Zipline,michaeljohnbennett/zipline,iamkingmaker/zipline,wubr2000/zipline,bartosh/zipline,CDSFinance/zipline,jordancheah/zipline,chrjxj/zipline,umuzungu/zipline,ronalcc/zipline,CDSFinance/zipline,zhoulingjun/zipline,semio/zipline,Scapogo/zipline,CarterBain/AlephNull,jordancheah/zipline,wubr2000/zipline,ronalcc/zipline,davidastephens/zipline,erikness/AlephOne,jimgoo/zipline-fork,cmorgan/zipline,wilsonkichoi/zipline,stkubr/zipline,stkubr/zipline,florentchandelier/zipline,StratsOn/zipline,zhoulingjun/zipline,DVegaCapital/zipline,keir-rex/zipline,CarterBain/AlephNull,nborggren/zipline,nborggren/zipline,ChinaQuants/zipline,AlirezaShahabi/zipline,DVegaCapital/zipline,wilsonkichoi/zipline,dkushner/zipline,dmitriz/zipline