Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument vs Master instrument classes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Instrument vs Master instrument classes

    What's the logical / conceptual relation between class Instrument and MasterInstrument ?

    Instrument contains: Exchange, Expiry, FullName, ...
    MasterInstrument contains: Exchanges, InstrumentType, Commission, ... many other

    I would like to understand, what's the intention/logic behind this composition...
    Last edited by misova; 05-23-2015, 03:54 AM.

    #2
    Hello misova,

    Thank you for your post.

    MasterInstrument is called from Instrument. Instrument is used to call the BarsArray we are using, Instrument alone is the primary, Instruments allows for the call of additional bar series added. MasterInstrument allows us to pull specifics on the instrument.

    Please let me know if you have any questions.

    Comment


      #3
      Thank you,
      if Isummarize it shortly:
      • Instruments property represent array of Instruments (and bars) added by Add(xxx) in the Initialize() method.
      • MasterInstrument encapsulates real details of the instrument like (eur/usd, gold, sp500, ...)

      Now, I understand the structure, that's ok


      But the conceptual relation of them is still not crystal clear... maybe good question could clarify this:
      • So for example could'nt we have just MasterInstrument(s) array in the strategy?
      • Why it needs to be wrapped into Instrument, when most useful information is in MasterInstrument?

      Comment


        #4
        Hello,

        Thank you for the reply.

        I will try and clear up the difference between the two here.

        Instrument is considered Instance of the instrument and inherits from the MasterInstrument.

        Here is a simple example to explain this:

        ES 06-15 and ES 03-15 are two Instruments, they have pulled their specific settings (TickSize, Session etc..) from the ES MasterInstrument.

        The two objects are needed as the type of instrument can be the same name but different contracts but still need the same settings. Rather than have these individual settings for each instrument or contract, a MasterInstrument is used to define settings that a group of instruments would use.

        I look forward to being of further assistance.

        Comment


          #5
          Great explanation!

          I understand this completely now.
          Thank you very much!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          635 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          106 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X