Example #1
0
    internal OptionComputationTick(ResponseReader r)
    {
        if (!r.Builder.SupportsServerVersion(ServerVersion.PRICE_BASED_VOLATILITY))
        {
            r.RequireVersion(6);
        }

        RequestId = r.ReadInt();
        TickType  = r.ReadEnum <TickType>();
        if (r.Builder.SupportsServerVersion(ServerVersion.PRICE_BASED_VOLATILITY))
        {
            TickAttrib = r.ReadInt();
        }

        ImpliedVolatility = r.ReadDoubleNullable();
        if (ImpliedVolatility == -1)
        {
            ImpliedVolatility = null;
        }

        Delta = r.ReadDoubleNullable();
        if (Delta == -2)
        {
            Delta = null;
        }

        OptPrice = r.ReadDoubleNullable();
        if (OptPrice == -1)
        {
            OptPrice = null;
        }

        PvDividend = r.ReadDoubleNullable();
        if (PvDividend == -1)
        {
            PvDividend = null;
        }

        Gamma = r.ReadDoubleNullable();
        if (Gamma == -2)
        {
            Gamma = null;
        }

        Vega = r.ReadDoubleNullable();
        if (Vega == -2)
        {
            Vega = null;
        }

        Theta = r.ReadDoubleNullable();
        if (Theta == -2)
        {
            Theta = null;
        }

        UndPrice = r.ReadDoubleNullable();
        if (UndPrice == -1)
        {
            UndPrice = null;
        }
    }
Example #2
0
 internal void ReadLmtPrice() => Order.LimitPrice = (MessageVersion < 29) ? R.ReadDouble() : R.ReadDoubleNullable();