大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频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或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


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

    相關文章

      沒有相關內容
    主站蜘蛛池模板: 九九精品久久 | 黄色影院| 五月激情丁香婷婷综合第九 | 狠狠狠色丁香婷婷综合久久五月 | 国产精品午夜久久久久久99热 | 日本不卡一区二区三区 最新 | 欧美毛片免费看 | 久久精品亚洲乱码伦伦中文 | 精品国产一区二区三区2021 | 精品日产一区二区三区手机 | 91免费在线| 仑乱高清在线一级播放 | 性做久久久久久免费观看 | 91视频国内 | 狠狠躁天天躁夜夜躁婷婷 | 亚洲精品国产一区二区三区四区 | 亚洲精品视频免费看 | 在线视频这里只有精品 | 国内毛片视频 | 久久er99 | 国产精品视频999 | 日韩中文字幕视频在线 | 午夜精品久久影院蜜桃 | 视频福利网 | 久久久久久9 | 老子午夜精品我不卡影院 | 久久伊人精品 | 欧美日韩国产58香蕉在线视频 | 香蕉视频在线观看黄 | 黄色亚洲毛片 | 天天干天天操天天舔 | 欧美一级大片在线观看 | 国产精品美女久久久久网站 | 免费看黄色的视频 | 欧洲a视频| 57pao一国产成视频永久免费 | 久久99精品亚洲热综合 | 色午夜在线 | 欧美在线视频7777kkkk | 亚洲日本高清 | 日韩精品麻豆 |