cascade = sigma.createCascade() #'sell') sigma.printCascade(cascade) quit() cou = 0 for investOrder in cascade['investOrders']: investOrder['orderId'] = 666 if cou > len(cascade['investOrders']) / 2: #cascade['profitOrders'][cou]['orderId'] = 666 #cascade['profitOrders'][cou]['status'] = 1 print('\n {0}'.format(cou)) break cou += 1 #sigma.reportProfit(cascade) cascade = sigma.shiftOrders(cascade) sigma.printCascade(cascade) quit() print('\n\rincInvest = 1.0') cascade = sigma.createCascade() sigma.printCascade(cascade) print('\n\rshiftOrders') cascade = sigma.shiftOrders(cascade) sigma.printCascade(cascade)
if error: print('error with cancelOrders in cascade get profit: {0}'.format(error)) #reportCancelOrdersError() saveCascadeFile(cascadeFileName, cascadeStruct) quit() removeCascadeFile(cascadeFileName) quit() # if hasParnet(cascadeStruct): # for reverse # restoreParent(cascadeStruct) # quit() # ================== cascade get profit ================== # # ================== create revers cascade ================== # if not sigma.inSigma(cascadeStruct): print('Not in SIGMA') # cascadeStruct = sigma.createRevers(cascadeStruct) # saveCascadeFile(cascadeFileName, cascadeStruct) # quit() # ================== create revers cascade ================== # # ================== create order sequence ================== # cascadeStruct = sigma.shiftOrders(cascadeStruct) cascadeStruct, error = sigma.createOrders(cascadeStruct) if error: print('error with createOrders in create order sequence: {0}'.format(error)) cascadeStruct, error = sigma.moveProfitOrder(cascadeStruct) if error: print('error with moveProfitOrder in create order sequence: {0}'.format(error)) #reportMoveProfitOrderError() # ================== create order sequence ================== # saveCascadeFile(cascadeFileName, cascadeStruct)