Ejemplo n.º 1
0
 def __init__(self, price=None, volume=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     self.price = price if price is not None else deref_opt(
         _constant_Float(100.0))
     self.volume = volume if volume is not None else deref_opt(
         _constant_Float(1.0))
Ejemplo n.º 2
0
 def __init__(self, base = None, power = None):
     from marketsim.gen._out._observable._observablefloat import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablefloat.__init__(self)
     self.base = base if base is not None else deref_opt(_constant_Float(1.0))
     self.power = power if power is not None else deref_opt(_constant_Float(1.0))
Ejemplo n.º 3
0
 def getImpl(self):
     from marketsim.gen._out.orderbook._midprice import MidPrice_IOrderBook as _orderbook_MidPrice_IOrderBook
     from marketsim.gen._out.ops._div import Div_FloatFloat as _ops_Div_FloatFloat
     from marketsim.gen._out.math.rsi._raw import Raw_IObservableFloatFloatFloat as _math_rsi_Raw_IObservableFloatFloatFloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.ops._add import Add_FloatFloat as _ops_Add_FloatFloat
     from marketsim.gen._out.ops._sub import Sub_FloatFloat as _ops_Sub_FloatFloat
     return _ops_Sub_FloatFloat(_constant_Float(100.0),_ops_Div_FloatFloat(_constant_Float(100.0),_ops_Add_FloatFloat(_constant_Float(1.0),_math_rsi_Raw_IObservableFloatFloatFloat(_orderbook_MidPrice_IOrderBook(self.book),self.timeframe,self.alpha))))
Ejemplo n.º 4
0
 def __init__(self, signedVolume = None, price = None):
     from marketsim.gen._out._iorder import IOrder
     from marketsim.gen._out._observable._observableiorder import ObservableIOrder
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     ObservableIOrder.__init__(self)
     self.signedVolume = signedVolume if signedVolume is not None else deref_opt(_constant_Float(1.0))
     self.price = price if price is not None else deref_opt(_constant_Float(100.0))
Ejemplo n.º 5
0
 def __init__(self, x = None, y = None):
     from marketsim.gen._out._observable._observablebool import Observablebool
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablebool.__init__(self)
     self.x = x if x is not None else deref_opt(_constant_Float(1.0))
     self.y = y if y is not None else deref_opt(_constant_Float(1.0))
     Equal_Impl.__init__(self)
Ejemplo n.º 6
0
 def __init__(self, x = None, y = None):
     from marketsim.gen._out._observable._observablebool import Observablebool
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablebool.__init__(self)
     self.x = x if x is not None else deref_opt(_constant_Float(1.0))
     self.y = y if y is not None else deref_opt(_constant_Float(1.0))
     Greater_Impl.__init__(self)
Ejemplo n.º 7
0
 def getImpl(self):
     from marketsim.gen._out.strategy.price._ticker import Ticker_strategypriceMarketData as _strategy_price_Ticker_strategypriceMarketData
     from marketsim.gen._out.strategy._generic import Generic_IObservableIOrderIEvent as _strategy_Generic_IObservableIOrderIEvent
     from marketsim.gen._out.observable._quote import Quote_StringStringString as _observable_Quote_StringStringString
     from marketsim.gen._out.observable._breaksatchanges import BreaksAtChanges_IObservableFloat as _observable_BreaksAtChanges_IObservableFloat
     from marketsim.gen._out.strategy.price._volume import Volume_strategypriceMarketData as _strategy_price_Volume_strategypriceMarketData
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._floatingprice import FloatingPrice_FloatIObservableIOrderIObservableFloat as _order_FloatingPrice_FloatIObservableIOrderIObservableFloat
     from marketsim.gen._out.strategy.price._end import End_strategypriceMarketData as _strategy_price_End_strategypriceMarketData
     from marketsim.gen._out.order._curried._price_limit import price_Limit_SideFloat as _order__curried_price_Limit_SideFloat
     from marketsim.gen._out.order._iceberg import Iceberg_IObservableIOrderFloat as _order_Iceberg_IObservableIOrderFloat
     from marketsim.gen._out.strategy.price._delta import Delta_strategypriceMarketData as _strategy_price_Delta_strategypriceMarketData
     from marketsim.gen._out.ops._add import Add_IObservableFloatFloat as _ops_Add_IObservableFloatFloat
     from marketsim.gen._out.event._after import After_Float as _event_After_Float
     from marketsim.gen._out.strategy.price._start import Start_strategypriceMarketData as _strategy_price_Start_strategypriceMarketData
     from marketsim import deref_opt
     return deref_opt(
         _strategy_Generic_IObservableIOrderIEvent(
             deref_opt(
                 _order_Iceberg_IObservableIOrderFloat(
                     deref_opt(
                         _order_FloatingPrice_FloatIObservableIOrderIObservableFloat(
                             deref_opt(
                                 _order__curried_price_Limit_SideFloat(
                                     self.side,
                                     deref_opt(
                                         _constant_Float((deref_opt(
                                             _strategy_price_Volume_strategypriceMarketData(
                                                 self.x)) * 1000))))),
                             deref_opt(
                                 _observable_BreaksAtChanges_IObservableFloat(
                                     deref_opt(
                                         _ops_Add_IObservableFloatFloat(
                                             deref_opt(
                                                 _observable_Quote_StringStringString(
                                                     deref_opt(
                                                         _strategy_price_Ticker_strategypriceMarketData(
                                                             self.x)),
                                                     deref_opt(
                                                         _strategy_price_Start_strategypriceMarketData(
                                                             self.x)),
                                                     deref_opt(
                                                         _strategy_price_End_strategypriceMarketData(
                                                             self.x)))),
                                             deref_opt(
                                                 _constant_Float((deref_opt(
                                                     _strategy_price_Delta_strategypriceMarketData(
                                                         self.x)) *
                                                                  self.sign
                                                                  ))))))))),
                     deref_opt(
                         _constant_Float(
                             deref_opt(
                                 _strategy_price_Volume_strategypriceMarketData(
                                     self.x)))))),
             deref_opt(_event_After_Float(deref_opt(
                 _constant_Float(0.0))))))
Ejemplo n.º 8
0
 def __init__(self, base=None, power=None):
     from marketsim.gen._out._observable._observablefloat import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablefloat.__init__(self)
     self.base = base if base is not None else deref_opt(
         _constant_Float(1.0))
     self.power = power if power is not None else deref_opt(
         _constant_Float(1.0))
Ejemplo n.º 9
0
 def __init__(self, base = None, power = None):
     from marketsim.gen._out._observable import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     Observablefloat.__init__(self)
     self.base = base if base is not None else _constant_Float(1.0)
     
     self.power = power if power is not None else _constant_Float(1.0)
     
     rtti.check_fields(self)
Ejemplo n.º 10
0
 def __init__(self, side = None, price = None, volume = None):
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._iorder import IOrder
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out._observable._observableiorder import ObservableIOrder
     from marketsim import deref_opt
     ObservableIOrder.__init__(self)
     self.side = side if side is not None else deref_opt(_side_Sell_())
     self.price = price if price is not None else deref_opt(_constant_Float(100.0))
     self.volume = volume if volume is not None else deref_opt(_constant_Float(1.0))
Ejemplo n.º 11
0
    def __init__(self, base=None, power=None):
        from marketsim.gen._out._observable import Observablefloat
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        from marketsim import rtti
        Observablefloat.__init__(self)
        self.base = base if base is not None else _constant_Float(1.0)

        self.power = power if power is not None else _constant_Float(1.0)

        rtti.check_fields(self)
Ejemplo n.º 12
0
 def __init__(self, x = None, y = None):
     from marketsim.gen._out._observable import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     Observablefloat.__init__(self)
     self.x = x if x is not None else _constant_Float(1.0)
     
     self.y = y if y is not None else _constant_Float(1.0)
     
     rtti.check_fields(self)
     _Sub_Impl.__init__(self)
Ejemplo n.º 13
0
 def __init__(self, signedVolume = None, price = None):
     from marketsim.gen._out._iorder import IOrder
     from marketsim.gen._out._observable import ObservableIOrder
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     ObservableIOrder.__init__(self)
     self.signedVolume = signedVolume if signedVolume is not None else _constant_Float(1.0)
     
     self.price = price if price is not None else _constant_Float(100.0)
     
     rtti.check_fields(self)
Ejemplo n.º 14
0
    def __init__(self, x=None, y=None):
        from marketsim.gen._out._observable import Observablebool
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        from marketsim import rtti
        Observablebool.__init__(self)
        self.x = x if x is not None else _constant_Float(1.0)

        self.y = y if y is not None else _constant_Float(1.0)

        rtti.check_fields(self)
        _LessEqual_Impl.__init__(self)
Ejemplo n.º 15
0
 def __init__(self, x = None, y = None):
     from marketsim import _
     from marketsim import event
     from marketsim.gen._out._observable._observablefloat import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablefloat.__init__(self)
     self.x = x if x is not None else deref_opt(_constant_Float(1.0))
     self.y = y if y is not None else deref_opt(_constant_Float(1.0))
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 16
0
 def __init__(self, x = None, elsePart = None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import event
     from marketsim.gen._out._observable import Observablefloat
     Observablefloat.__init__(self)
     self.x = x if x is not None else _constant_Float(1.0)
     self.elsePart = elsePart if elsePart is not None else _constant_Float(1.0)
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 17
0
 def __init__(self, x=None, y=None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import event
     from marketsim.gen._out._observable import Observablefloat
     Observablefloat.__init__(self)
     self.x = x if x is not None else _constant_Float(1.0)
     self.y = y if y is not None else _constant_Float(1.0)
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 18
0
 def __init__(self, cond = None, ifpart = None, elsepart = None):
     from marketsim.gen._out._observable import Observablefloat
     from marketsim.gen._out._true import true_ as _true_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     Observablefloat.__init__(self)
     self.cond = cond if cond is not None else _true_()
     
     self.ifpart = ifpart if ifpart is not None else _constant_Float(1.0)
     
     self.elsepart = elsepart if elsepart is not None else _constant_Float(1.0)
     
     rtti.check_fields(self)
     _Condition_Impl.__init__(self)
Ejemplo n.º 19
0
 def getImpl(self):
     from marketsim.gen._out.math._exp import Exp_Float as _math_Exp_Float
     from marketsim.gen._out.side._buy import Buy_ as _side_Buy_
     from marketsim.gen._out.ops._div import Div_IObservableFloatFloat as _ops_Div_IObservableFloatFloat
     from marketsim.gen._out.math._atan import Atan_Float as _math_Atan_Float
     from marketsim.gen._out._constant import constant_Int as _constant_Int
     from marketsim.gen._out.ops._div import Div_FloatFloat as _ops_Div_FloatFloat
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._floatingprice import FloatingPrice_IObservableFloatFloatIObservableIOrder as _order_FloatingPrice_IObservableFloatFloatIObservableIOrder
     from marketsim.gen._out.observable._breaksatchanges import BreaksAtChanges_IObservableFloat as _observable_BreaksAtChanges_IObservableFloat
     from marketsim.gen._out.order._curried._price_limit import price_Limit_SideFloat as _order__curried_price_Limit_SideFloat
     from marketsim.gen._out.orderbook._bids import Bids_IOrderBook as _orderbook_Bids_IOrderBook
     from marketsim.gen._out.orderbook._safesideprice import SafeSidePrice_IOrderQueueFloat as _orderbook_SafeSidePrice_IOrderQueueFloat
     from marketsim.gen._out.strategy._combine import Combine_ISingleAssetStrategyISingleAssetStrategy as _strategy_Combine_ISingleAssetStrategyISingleAssetStrategy
     from marketsim.gen._out.observable._oneverydt import OnEveryDt_FloatFloat as _observable_OnEveryDt_FloatFloat
     from marketsim.gen._out.event._after import After_Float as _event_After_Float
     from marketsim.gen._out.orderbook._asks import Asks_IOrderBook as _orderbook_Asks_IOrderBook
     from marketsim.gen._out.strategy._generic import Generic_IObservableIOrderIEvent as _strategy_Generic_IObservableIOrderIEvent
     from marketsim.gen._out.trader._position import Position_IAccount as _trader_Position_IAccount
     from marketsim.gen._out.order._iceberg import Iceberg_IObservableIOrderFloat as _order_Iceberg_IObservableIOrderFloat
     return _strategy_Combine_ISingleAssetStrategyISingleAssetStrategy(
         _strategy_Generic_IObservableIOrderIEvent(
             _order_Iceberg_IObservableIOrderFloat(
                 _order_FloatingPrice_IObservableFloatFloatIObservableIOrder(
                     _observable_BreaksAtChanges_IObservableFloat(
                         _observable_OnEveryDt_FloatFloat(
                             _ops_Div_IObservableFloatFloat(
                                 _orderbook_SafeSidePrice_IOrderQueueFloat(
                                     _orderbook_Asks_IOrderBook(),
                                     _constant_Float((100 + self.delta))),
                                 _math_Exp_Float(
                                     _ops_Div_FloatFloat(
                                         _math_Atan_Float(
                                             _trader_Position_IAccount()),
                                         _constant_Int(1000)))), 0.9)),
                     _order__curried_price_Limit_SideFloat(
                         _side_Sell_(), _constant_Float(
                             (self.volume * 1000)))),
                 _constant_Float(self.volume)),
             _event_After_Float(_constant_Float(0.0))),
         _strategy_Generic_IObservableIOrderIEvent(
             _order_Iceberg_IObservableIOrderFloat(
                 _order_FloatingPrice_IObservableFloatFloatIObservableIOrder(
                     _observable_BreaksAtChanges_IObservableFloat(
                         _observable_OnEveryDt_FloatFloat(
                             _ops_Div_IObservableFloatFloat(
                                 _orderbook_SafeSidePrice_IOrderQueueFloat(
                                     _orderbook_Bids_IOrderBook(),
                                     _constant_Float((100 - self.delta))),
                                 _math_Exp_Float(
                                     _ops_Div_FloatFloat(
                                         _math_Atan_Float(
                                             _trader_Position_IAccount()),
                                         _constant_Int(1000)))), 0.9)),
                     _order__curried_price_Limit_SideFloat(
                         _side_Buy_(), _constant_Float(
                             (self.volume * 1000)))),
                 _constant_Float(self.volume)),
             _event_After_Float(_constant_Float(0.0))))
Ejemplo n.º 20
0
 def __init__(self, side = None, price = None, volume = None):
     from marketsim.gen._out._iorder import IOrder
     from marketsim import rtti
     from marketsim.gen._out._observable import ObservableIOrder
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     ObservableIOrder.__init__(self)
     self.side = side if side is not None else _side_Sell_()
     
     self.price = price if price is not None else _constant_Float(100.0)
     
     self.volume = volume if volume is not None else _constant_Float(1.0)
     
     rtti.check_fields(self)
Ejemplo n.º 21
0
    def __init__(self, side=None, price=None, volume=None):
        from marketsim.gen._out._iorder import IOrder
        from marketsim import rtti
        from marketsim.gen._out._observable import ObservableIOrder
        from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        ObservableIOrder.__init__(self)
        self.side = side if side is not None else _side_Sell_()

        self.price = price if price is not None else _constant_Float(100.0)

        self.volume = volume if volume is not None else _constant_Float(1.0)

        rtti.check_fields(self)
Ejemplo n.º 22
0
    def __init__(self, cond=None, ifpart=None, elsepart=None):
        from marketsim.gen._out._observable import Observablefloat
        from marketsim.gen._out._true import true_ as _true_
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        from marketsim import rtti
        Observablefloat.__init__(self)
        self.cond = cond if cond is not None else _true_()

        self.ifpart = ifpart if ifpart is not None else _constant_Float(1.0)

        self.elsepart = elsepart if elsepart is not None else _constant_Float(
            1.0)

        rtti.check_fields(self)
        _Condition_Impl.__init__(self)
Ejemplo n.º 23
0
 def __call__(self, price=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._withexpiry import WithExpiry
     price = price if price is not None else _constant_Float(100.0)
     expiry = self.expiry
     proto = self.proto
     return WithExpiry(expiry, proto(price))
Ejemplo n.º 24
0
 def __init__(self, side=None, volume=None):
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim import deref_opt
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     self.side = side if side is not None else deref_opt(_side_Sell_())
     self.volume = volume if volume is not None else deref_opt(
         _constant_Float(1.0))
 def __call__(self, volume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_iceberg import price_Iceberg
     volume = volume if volume is not None else _constant_Float(1.0)
     proto = self.proto
     lotSize = self.lotSize
     return price_Iceberg(proto(volume), lotSize)
 def __call__(self, signedVolume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.order._limitsigned import LimitSigned
     signedVolume = signedVolume if signedVolume is not None else deref_opt(_constant_Float(1.0))
     price = self.price
     return LimitSigned(signedVolume, price)
 def __init__(self, proto = None, lotSize = None):
     from marketsim.gen._out.order._curried._side_price_limit import side_price_Limit_Float as _order__curried_side_price_Limit_Float
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     self.proto = proto if proto is not None else _order__curried_side_price_Limit_Float()
     self.lotSize = lotSize if lotSize is not None else _constant_Float(10.0)
     rtti.check_fields(self)
Ejemplo n.º 28
0
 def __call__(self, price=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._stoploss import StopLoss
     price = price if price is not None else _constant_Float(100.0)
     maxloss = self.maxloss
     proto = self.proto
     return StopLoss(maxloss, proto(price))
Ejemplo n.º 29
0
 def __call__(self, volume=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_iceberg import price_Iceberg
     volume = volume if volume is not None else _constant_Float(1.0)
     proto = self.proto
     lotSize = self.lotSize
     return price_Iceberg(proto(volume), lotSize)
Ejemplo n.º 30
0
 def __call__(self, price=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._iceberg import Iceberg
     price = price if price is not None else _constant_Float(100.0)
     proto = self.proto
     lotSize = self.lotSize
     return Iceberg(proto(price), lotSize)
 def __call__(self, volume=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_withexpiry import price_WithExpiry
     volume = volume if volume is not None else _constant_Float(1.0)
     expiry = self.expiry
     proto = self.proto
     return price_WithExpiry(expiry, proto(volume))
Ejemplo n.º 32
0
 def getImpl(self):
     from marketsim.gen._out.math._max import Max_FloatIObservableFloat as _math_Max_FloatIObservableFloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.ops._sub import Sub_IObservableFloatIObservableFloat as _ops_Sub_IObservableFloatIObservableFloat
     from marketsim.gen._out.math._lagged import Lagged_IObservableFloatFloat as _math_Lagged_IObservableFloatFloat
     from marketsim import deref_opt
     return deref_opt(_math_Max_FloatIObservableFloat(deref_opt(_constant_Float(0.0)),deref_opt(_ops_Sub_IObservableFloatIObservableFloat(self.source,deref_opt(_math_Lagged_IObservableFloatFloat(self.source,self.timeframe))))))
 def __init__(self, maxloss = None, proto = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._sidevolume_price_limit import sidevolume_price_Limit_ as _order__curried_sidevolume_price_Limit_
     from marketsim import rtti
     self.maxloss = maxloss if maxloss is not None else _constant_Float(0.1)
     self.proto = proto if proto is not None else _order__curried_sidevolume_price_Limit_()
     rtti.check_fields(self)
 def __call__(self, price = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.order._immediateorcancel import ImmediateOrCancel
     price = price if price is not None else deref_opt(_constant_Float(100.0))
     proto = self.proto
     return ImmediateOrCancel(proto(price))
Ejemplo n.º 35
0
 def __call__(self, volume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._stoploss import StopLoss
     volume = volume if volume is not None else _constant_Float(1.0)
     maxloss = self.maxloss
     proto = self.proto
     return StopLoss(maxloss, proto(volume))
Ejemplo n.º 36
0
 def __init__(self, f = None, base = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     self.f = f if f is not None else _constant_Float(1.0)
     self.base = base if base is not None else 1.002
     rtti.check_fields(self)
     self.impl = self.getImpl()
Ejemplo n.º 37
0
 def __call__(self, f = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.strategy.weight._atanpow import AtanPow_FloatFloat as _strategy_weight_AtanPow_FloatFloat
     f = f if f is not None else deref_opt(_constant_Float(1.0))
     base = self.base
     return _strategy_weight_AtanPow_FloatFloat(f,base)
 def __init__(self, expiry = None, proto = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._sidevolume_limit import sidevolume_Limit_Float as _order__curried_sidevolume_Limit_Float
     from marketsim import rtti
     self.expiry = expiry if expiry is not None else _constant_Float(10.0)
     self.proto = proto if proto is not None else _order__curried_sidevolume_Limit_Float()
     rtti.check_fields(self)
Ejemplo n.º 39
0
 def __call__(self, price = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._iceberg import Iceberg
     price = price if price is not None else _constant_Float(100.0)
     proto = self.proto
     lotSize = self.lotSize
     return Iceberg(proto(price), lotSize)
Ejemplo n.º 40
0
 def __init__(self, x = None):
     from marketsim.gen._out._observable._observablefloat import Observablefloat
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     Observablefloat.__init__(self)
     self.x = x if x is not None else deref_opt(_constant_Float(1.0))
     Negate_Impl.__init__(self)
Ejemplo n.º 41
0
 def __call__(self, price = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._limit import Limit
     price = price if price is not None else _constant_Float(100.0)
     side = self.side
     volume = self.volume
     return Limit(side, price, volume)
Ejemplo n.º 42
0
    def __call__(self, f=None):
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        from marketsim import deref_opt
        from marketsim.gen._out.strategy.weight._clamp0 import Clamp0_Float as _strategy_weight_Clamp0_Float
        f = f if f is not None else deref_opt(_constant_Float(1.0))

        return _strategy_weight_Clamp0_Float(f)
Ejemplo n.º 43
0
 def __call__(self, f=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.strategy.weight._atanpow import AtanPow_FloatFloat as _strategy_weight_AtanPow_FloatFloat
     f = f if f is not None else deref_opt(_constant_Float(1.0))
     base = self.base
     return _strategy_weight_AtanPow_FloatFloat(f, base)
 def __call__(self, volume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._floatingprice import FloatingPrice
     volume = volume if volume is not None else _constant_Float(1.0)
     floatingPrice = self.floatingPrice
     proto = self.proto
     return FloatingPrice(floatingPrice, proto(volume))
 def __call__(self, signedVolume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.order._marketsigned import MarketSigned
     signedVolume = signedVolume if signedVolume is not None else deref_opt(_constant_Float(1.0))
     
     return MarketSigned(signedVolume)
Ejemplo n.º 46
0
    def __init__(self, side=None, volume=None):
        from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
        from marketsim import deref_opt
        from marketsim.gen._out._constant import constant_Float as _constant_Float

        self.side = side if side is not None else deref_opt(_side_Sell_())
        self.volume = volume if volume is not None else deref_opt(_constant_Float(1.0))
Ejemplo n.º 47
0
    def __call__(self, signedVolume=None):
        from marketsim.gen._out._constant import constant_Float as _constant_Float
        from marketsim.gen._out.order._marketsigned import MarketSigned
        signedVolume = signedVolume if signedVolume is not None else _constant_Float(
            1.0)

        return MarketSigned(signedVolume)
 def __call__(self, volume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_withexpiry import price_WithExpiry
     volume = volume if volume is not None else _constant_Float(1.0)
     expiry = self.expiry
     proto = self.proto
     return price_WithExpiry(expiry, proto(volume))
Ejemplo n.º 49
0
 def __call__(self, volume = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_floatingprice import price_FloatingPrice
     volume = volume if volume is not None else _constant_Float(1.0)
     floatingPrice = self.floatingPrice
     proto = self.proto
     return price_FloatingPrice(floatingPrice, proto(volume))
 def __init__(self, proto = None, lotSize = None):
     from marketsim.gen._out.order._curried._sidevolume_price_limit import sidevolume_price_Limit_ as _order__curried_sidevolume_price_Limit_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     self.proto = proto if proto is not None else _order__curried_sidevolume_price_Limit_()
     self.lotSize = lotSize if lotSize is not None else _constant_Float(10.0)
     rtti.check_fields(self)
 def __call__(self, volume=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._curried._price_stoploss import price_StopLoss
     volume = volume if volume is not None else _constant_Float(1.0)
     maxloss = self.maxloss
     proto = self.proto
     return price_StopLoss(maxloss, proto(volume))
Ejemplo n.º 52
0
 def __init__(self, side=None, volume=None):
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     self.side = side if side is not None else _side_Sell_()
     self.volume = volume if volume is not None else _constant_Float(1.0)
     rtti.check_fields(self)
Ejemplo n.º 53
0
 def __init__(self, side = None, volume = None):
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import rtti
     self.side = side if side is not None else _side_Sell_()
     self.volume = volume if volume is not None else _constant_Float(1.0)
     rtti.check_fields(self)
Ejemplo n.º 54
0
 def __call__(self, f = None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim import deref_opt
     from marketsim.gen._out.strategy.weight._clamp0 import Clamp0_Float as _strategy_weight_Clamp0_Float
     f = f if f is not None else deref_opt(_constant_Float(1.0))
     
     return _strategy_weight_Clamp0_Float(f)
Ejemplo n.º 55
0
 def __call__(self, price=None):
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out.order._limit import Limit
     price = price if price is not None else _constant_Float(100.0)
     side = self.side
     volume = self.volume
     return Limit(side, price, volume)