大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識>>正文內容

context對象在Cython下的傳遞 [金字塔]

:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">def handle_bar(context)是可以正常運行的:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">但現在需要用:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">settimer來自己控制,實際運行的程序是:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">def run(context),如果不編譯也是正常的,但是編譯以后: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">settimer(run,1000)這句代碼無法帶入:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">context參數,報一個錯誤,說是要求是str的類型,但實際上是: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">context類型: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"="">有什么辦法解決這個問題:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">問題在于:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">settimer和:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">killtimer要求函數必須有:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">context參數,但是帶參數編譯過后的pyd又報類型不對:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">Argument 'context' has incorrect type (expected str, got context):="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> :="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">我在想是否能夠指定一下:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"="">context這個參數的類型?: none; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-variant: normal; word-spacing: 0px; display: inline=" inline"="" !important;="" white-space:="" normal;="" orphans:="" 2;="" float:="" none;="" -webkit-text-stroke-width:="" 0px;="" background-color:="" rgb(255,="" 255,="" 255);"=""> : none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">settimer 設定計時器—定時觸發:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> : none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">函數原型:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> : none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: inherit; word-spacing: 0px;"> : none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">設定計時器—定時觸發,僅"paper_trading"模式有效:="" -webkit-text-stroke-width:="" white-space:="" word-spacing:="" 0px;"=""> 注意:function函數一定要包含(并且只能包含)context
?


?

  • 網友回復:
    還有一個辦法就是自己寫一個死循環,這樣可以運行,但是退出的時候怎么結束這個進程?def init(context):
    ??? while True:
    ??????? run(context)
    ??????? time.sleep(1)

    ?

  • 網友回復:

    import time
    definit(context):
    ??? # 設置計時器
    ??? settimer(msg,10)

    defmsg(context):
    ??? #輸出現在時間
    ??? a = time.asctime( time.localtime(time.time()) )
    ??? print(a)
    #退出程序后殺死計時器
    defexit(context):
    ??? killtimer(msg)

    ?

    ?

    ?

    ?

    不是很明白范例里這個不是可以的嗎?退出時候殺死計時器

  •  

    有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友

    可聯系技術人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

    怎么收費,代編流程等詳情請點擊閱讀!

    (注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


    【字體: 】【打印文章】【查看評論

    相關文章

      沒有相關內容
    主站蜘蛛池模板: 香蕉视频网站入口 | 国产精品u任我爽爆在线播放 | 九九资源站 | 日韩精品久久久久久 | 男女性高清爱潮视频免费观看 | 国产成人cao在线 | 国内久久精品视频 | 国内精品视频一区二区八戒 | 99热6这里只有精品 99热7 | 欧美中文字幕一二三四区 | 奇米第一色 | 999精品久久久中文字幕蜜桃 | 99视频免费在线观看 | 影音先锋在线亚洲精品推荐 | 五月天精品 | 99re这里有免费视频精品 | 亚洲成人福利 | 欧洲亚洲综合一区二区三区 | 久久久久国产精品四虎 | 69成人做爰视频在线观看 | 97影院3| 老司机福利精品 | 大美女久久久久久j久久 | 四虎影院在线免费观看 | 精品久久一区二区 | 97国产免费全部免费观看 | 免费九九视频 | 天天操天天操天天 | 狠狠干人人插 | 一级特级欧美aa毛片免费 | 国产高清在线精品二区一 | 日韩黄色精品 | 波多野结衣一区二区三区 | 日韩欧美黄色 | 伊人色播 | 久久只有精品视频 | 免费一级欧美片在线观看 | 色综合夜夜嗨亚洲一二区 | 国产欧美亚洲精品一区 | 久久综合综合久久狠狠狠97色 | a色视频|