• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python rtti.can_be_casted函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中marketsim.rtti.can_be_casted函数的典型用法代码示例。如果您正苦于以下问题:Python can_be_casted函数的具体用法?Python can_be_casted怎么用?Python can_be_casted使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了can_be_casted函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: LimitSigned

def LimitSigned(signedVolume = None,price = None): 
    from marketsim.gen._out._ifunction import IFunctionfloat
    from marketsim import rtti
    if signedVolume is None or rtti.can_be_casted(signedVolume, IFunctionfloat):
        if price is None or rtti.can_be_casted(price, IFunctionfloat):
            return LimitSigned_FloatFloat(signedVolume,price)
    raise Exception('Cannot find suitable overload for LimitSigned('+str(signedVolume) +':'+ str(type(signedVolume))+','+str(price) +':'+ str(type(price))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_LimitSigned.py


示例2: CSV

def CSV(directory = None,source = None,attributes = None): 
    from marketsim import rtti
    if directory is None or rtti.can_be_casted(directory, str):
        if source is None or rtti.can_be_casted(source, object):
            if attributes is None or rtti.can_be_casted(attributes, object):
                return CSV_StringAnyAny(directory,source,attributes)
    raise Exception('Cannot find suitable overload for CSV('+str(directory) +':'+ str(type(directory))+','+str(source) +':'+ str(type(source))+','+str(attributes) +':'+ str(type(attributes))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_csv.py


示例3: Combine

def Combine(A = None,B = None): 
    from marketsim.gen._out._isingleassetstrategy import ISingleAssetStrategy
    from marketsim import rtti
    if A is None or rtti.can_be_casted(A, ISingleAssetStrategy):
        if B is None or rtti.can_be_casted(B, ISingleAssetStrategy):
            return Combine_ISingleAssetStrategyISingleAssetStrategy(A,B)
    raise Exception('Cannot find suitable overload for Combine('+str(A) +':'+ str(type(A))+','+str(B) +':'+ str(type(B))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_combine.py


示例4: TwoWayLink

def TwoWayLink(up = None,down = None): 
    from marketsim.gen._out._ilink import ILink
    from marketsim import rtti
    if up is None or rtti.can_be_casted(up, ILink):
        if down is None or rtti.can_be_casted(down, ILink):
            return TwoWayLink_ILinkILink(up,down)
    raise Exception('Cannot find suitable overload for TwoWayLink('+str(up) +':'+ str(type(up))+','+str(down) +':'+ str(type(down))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_twowaylink.py


示例5: triangular

def triangular(Low = None,High = None,Mode = None): 
    from marketsim import rtti
    if Low is None or rtti.can_be_casted(Low, float):
        if High is None or rtti.can_be_casted(High, float):
            if Mode is None or rtti.can_be_casted(Mode, float):
                return triangular_FloatFloatFloat(Low,High,Mode)
    raise Exception('Cannot find suitable overload for triangular('+str(Low) +':'+ str(type(Low))+','+str(High) +':'+ str(type(High))+','+str(Mode) +':'+ str(type(Mode))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_triangular.py


示例6: AsksImpl

def AsksImpl(tickSize = None,book = None): 
    from marketsim.gen._out._iorderbook import IOrderBook
    from marketsim import rtti
    if tickSize is None or rtti.can_be_casted(tickSize, float):
        if book is None or rtti.can_be_casted(book, IOrderBook):
            return AsksImpl_FloatIOrderBook(tickSize,book)
    raise Exception('Cannot find suitable overload for AsksImpl('+str(tickSize) +':'+ str(type(tickSize))+','+str(book) +':'+ str(type(book))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_asksimpl.py


示例7: LadderMM

def LadderMM(orderFactory = None,initialSize = None): 
    from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionsideifunctionfloat import IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat
    from marketsim import rtti
    if orderFactory is None or rtti.can_be_casted(orderFactory, IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat):
        if initialSize is None or rtti.can_be_casted(initialSize, int):
            return LadderMM_SideFloatIObservableIOrderInt(orderFactory,initialSize)
    raise Exception('Cannot find suitable overload for LadderMM('+str(orderFactory) +':'+ str(type(orderFactory))+','+str(initialSize) +':'+ str(type(initialSize))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_laddermm.py


示例8: AtanPow

def AtanPow(f = None,base = None): 
    from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
    from marketsim import rtti
    if f is None or rtti.can_be_casted(f, IFunctionfloat):
        if base is None or rtti.can_be_casted(base, float):
            return AtanPow_FloatFloat(f,base)
    raise Exception('Cannot find suitable overload for AtanPow('+str(f) +':'+ str(type(f))+','+str(base) +':'+ str(type(base))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_atanpow.py


示例9: C

def C(x = None,p = None): 
    from marketsim.gen._out._ifunction import IFunctionICandleStick
    from marketsim import rtti
    if x is None or rtti.can_be_casted(x, IFunctionICandleStick):
        if p is None or rtti.can_be_casted(p, int):
            return C_ICandleStickInt(x,p)
    raise Exception('Cannot find suitable overload for C('+str(x) +':'+ str(type(x))+','+str(p) +':'+ str(type(p))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_c.py


示例10: TraderEfficiencyTrend

def TraderEfficiencyTrend(trader = None,alpha = None): 
    from marketsim.gen._out._iaccount import IAccount
    from marketsim import rtti
    if trader is None or rtti.can_be_casted(trader, IAccount):
        if alpha is None or rtti.can_be_casted(alpha, float):
            return TraderEfficiencyTrend_IAccountFloat(trader,alpha)
    raise Exception('Cannot find suitable overload for TraderEfficiencyTrend('+str(trader) +':'+ str(type(trader))+','+str(alpha) +':'+ str(type(alpha))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_traderefficiencytrend.py


示例11: WithExpiry

def WithExpiry(proto=None, expiry=None):
    from marketsim.gen._out._ifunction._ifunctionifunctioniobservableiorder_from_ifunctionfloat_from_ifunctionside import (
        IFunctionIFunctionIObservableIOrder_from_IFunctionfloat_from_IFunctionSide,
    )
    from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
    from marketsim.gen._out.order._curried._side_price_withexpiry import (
        side_price_WithExpiry_SideFloatIObservableIOrderFloat as _order__curried_side_price_WithExpiry_SideFloatIObservableIOrderFloat,
    )
    from marketsim import rtti

    if proto is None or rtti.can_be_casted(
        proto, IFunctionIFunctionIObservableIOrder_from_IFunctionfloat_from_IFunctionSide
    ):
        if expiry is None or rtti.can_be_casted(expiry, IFunctionfloat):
            return _order__curried_side_price_WithExpiry_SideFloatIObservableIOrderFloat(proto, expiry)
    raise Exception(
        "Cannot find suitable overload for WithExpiry("
        + str(proto)
        + ":"
        + str(type(proto))
        + ","
        + str(expiry)
        + ":"
        + str(type(expiry))
        + ")"
    )
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:26,代码来源:_withexpiry.py


示例12: OnEveryDt

def OnEveryDt(x = None,dt = None): 
    from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
    from marketsim import rtti
    if x is None or rtti.can_be_casted(x, IFunctionfloat):
        if dt is None or rtti.can_be_casted(dt, float):
            return OnEveryDt_FloatFloat(x,dt)
    raise Exception('Cannot find suitable overload for OnEveryDt('+str(x) +':'+ str(type(x))+','+str(dt) +':'+ str(type(dt))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_OnEveryDt.py


示例13: LogReturns

def LogReturns(x = None,timeframe = None): 
    from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
    from marketsim import rtti
    if x is None or rtti.can_be_casted(x, IObservablefloat):
        if timeframe is None or rtti.can_be_casted(timeframe, float):
            return LogReturns_IObservableFloatFloat(x,timeframe)
    raise Exception('Cannot find suitable overload for LogReturns('+str(x) +':'+ str(type(x))+','+str(timeframe) +':'+ str(type(timeframe))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_logreturns.py


示例14: Pow

def Pow(base = None,power = None): 
    from marketsim.gen._out._ifunction import IFunctionfloat
    from marketsim import rtti
    if base is None or rtti.can_be_casted(base, IFunctionfloat):
        if power is None or rtti.can_be_casted(power, IFunctionfloat):
            return Pow_FloatFloat(base,power)
    raise Exception('Cannot find suitable overload for Pow('+str(base) +':'+ str(type(base))+','+str(power) +':'+ str(type(power))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_Pow.py


示例15: WeightedPrice

def WeightedPrice(queue = None,alpha = None): 
    from marketsim.gen._out._iorderqueue import IOrderQueue
    from marketsim import rtti
    if queue is None or rtti.can_be_casted(queue, IOrderQueue):
        if alpha is None or rtti.can_be_casted(alpha, float):
            return WeightedPrice_IOrderQueueFloat(queue,alpha)
    raise Exception('Cannot find suitable overload for WeightedPrice('+str(queue) +':'+ str(type(queue))+','+str(alpha) +':'+ str(type(alpha))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_WeightedPrice.py


示例16: WeightedPrice

def WeightedPrice(book = None,alpha = None): 
    from marketsim.gen._out._iorderbook import IOrderBook
    from marketsim import rtti
    if book is None or rtti.can_be_casted(book, IOrderBook):
        if alpha is None or rtti.can_be_casted(alpha, float):
            return WeightedPrice_IOrderBookFloat(book,alpha)
    raise Exception('Cannot find suitable overload for WeightedPrice('+str(book) +':'+ str(type(book))+','+str(alpha) +':'+ str(type(alpha))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_WeightedPrice.py


示例17: Var

def Var(source = None,alpha = None): 
    from marketsim.gen._out._iobservable import IObservablefloat
    from marketsim import rtti
    if source is None or rtti.can_be_casted(source, IObservablefloat):
        if alpha is None or rtti.can_be_casted(alpha, float):
            return Var_IObservableFloatFloat(source,alpha)
    raise Exception('Cannot find suitable overload for Var('+str(source) +':'+ str(type(source))+','+str(alpha) +':'+ str(type(alpha))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_Var.py


示例18: side_Limit

def side_Limit(price = None,volume = None): 
    from marketsim.gen._out._ifunction import IFunctionfloat
    from marketsim import rtti
    if price is None or rtti.can_be_casted(price, IFunctionfloat):
        if volume is None or rtti.can_be_casted(volume, IFunctionfloat):
            return side_Limit_FloatFloat(price,volume)
    raise Exception('Cannot find suitable overload for side_Limit('+str(price) +':'+ str(type(price))+','+str(volume) +':'+ str(type(volume))+')')
开发者ID:abensrhir,项目名称:marketsimulator,代码行数:7,代码来源:_side_Limit.py


示例19: FloatingPrice

def FloatingPrice(proto=None, floatingPrice=None):
    from marketsim.gen._out._ifunction._ifunctionifunctioniobservableiorder_from_ifunctionfloat_from_ifunctionside import (
        IFunctionIFunctionIObservableIOrder_from_IFunctionfloat_from_IFunctionSide,
    )
    from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
    from marketsim.gen._out.order._curried._side_floatingprice import (
        side_FloatingPrice_SideFloatIObservableIOrderIObservableFloat as _order__curried_side_FloatingPrice_SideFloatIObservableIOrderIObservableFloat,
    )
    from marketsim import rtti

    if proto is None or rtti.can_be_casted(
        proto, IFunctionIFunctionIObservableIOrder_from_IFunctionfloat_from_IFunctionSide
    ):
        if floatingPrice is None or rtti.can_be_casted(floatingPrice, IObservablefloat):
            return _order__curried_side_FloatingPrice_SideFloatIObservableIOrderIObservableFloat(proto, floatingPrice)
    raise Exception(
        "Cannot find suitable overload for FloatingPrice("
        + str(proto)
        + ":"
        + str(type(proto))
        + ","
        + str(floatingPrice)
        + ":"
        + str(type(floatingPrice))
        + ")"
    )
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:26,代码来源:_floatingprice.py


示例20: Quote

def Quote(ticker = None,start = None,end = None): 
    from marketsim import rtti
    if ticker is None or rtti.can_be_casted(ticker, str):
        if start is None or rtti.can_be_casted(start, str):
            if end is None or rtti.can_be_casted(end, str):
                return Quote_StringStringString(ticker,start,end)
    raise Exception('Cannot find suitable overload for Quote('+str(ticker) +':'+ str(type(ticker))+','+str(start) +':'+ str(type(start))+','+str(end) +':'+ str(type(end))+')')
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_Quote.py



注:本文中的marketsim.rtti.can_be_casted函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python rtti.check_fields函数代码示例发布时间:2022-05-27
下一篇:
Python registry.insert函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap