Table of Contents


NxCoreSymbolSpin

The structure NxCoreSymbolSpin is defined in NxCoreAPI.h as:


struct NxCoreSymbolSpin {
    unsigned int SpinID;
    unsigned int IterLimit;
    unsigned int SubIterLimit;
    unsigned int IterCount;
    unsigned int SubIterCount;
};

SpinID

User assignable data member that you can use to pass additional information during the spin, or to identify different spins. The automatic Symbol Spin that occurs near the start of each NxCore Tape set the SpinID value to 0.

IterLimit

The upper limit value that IterCount will increment too. This implies that the size of the iteration is known from the beginning of the iteration (which it is). Knowing the size of the iteration allows you to write much simpler collection algorithms that only need to allocate structures once rather than reallocate as the size grows.

SubIterLimit

Used when iterating Option Contracts for an Option Series. Option Contracts are iterated one Option Series at a time. The SubIterLimit therefore represents the total number of Options Contracts for Option Series being Iterated (and identified as NxCoreMessage.coreHeader.pnxStringSymbol).

IterCount

A zero-based counter that increment up to IterLimit.

SubIterCount

A zero-based counter that increment up to SubIterLimit.

The following shows how the Symbol Spin is implemented internally


NxCoreSymbolSpin& s = pNxCoreMsg->coreData.SymbolSpin;

// for each option series at NxCoreMsg.coreHeader.ListedExg
for (s.IterCount = 0; s.IterCount < s.IterLimit; ++s.IterCount)
{
    // for each option contract in the option series.
    for (s.SubIterCount = 0; s.SubIterCount < s.SubIterLimit; ++s.SubIterCount)
    {
        pYourCallBackFunction(pNxCoreSys, pNxCoreMsg);
    }
}

Examples

See a number of examples here