当前位置: 首页>>代码示例>>Python>>正文


Python rtti.can_be_casted函数代码示例

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


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


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