Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GetCurrentFuture("CL");
- private string GetCurrentFuture(string name)
- {
- foreach (Instrument inst in Instrument.All)
- {
- if (inst.MasterInstrument.Name == name && inst.MasterInstrument.InstrumentType == InstrumentType.Future)
- {
- string instFullName = String.Format("{0} {1}-{2}",
- name,
- inst.MasterInstrument.GetNextExpiry(Core.Globals.Now).Month.ToString("D2"),
- inst.MasterInstrument.GetNextExpiry(Core.Globals.Now).ToString("yy"));
- return instFullName;
- }
- }
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement