Profile Picture

String to Symbol

Posted By phg 3 Years Ago
Message
phg
Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)
Posted Monday February 24 2014
public override void OrderFilled(Position position, Trade trade)
   {
      posSet = new PositionSettings();
      posSet.Symbol.Name   = TradingSystem.fillAction[position.Symbol.Name].Dequeue(); //<<< Fails at run time
      
The right-hand side yields a symbol-name as a string. The settings object I think wants a Symbol object not a string (or a string is insufficient).
How can I convert a string to an object acceptable to the settings object? (TradingSystem.Symbols might be the right direction? But it is not indexable by a string. I could try .ToList or .ToDictionary but then I still don't see how to retrieve what I want.)


-Pete

See also Yahoo group about applying RE.

Posted Monday February 24 2014
Try SystemData.GetSymbolByName() :-)

Daniel
phg
Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)Supreme Being (48,633 reputation)
Posted Monday February 24 2014
Thanks. That did it. I appreciate the help. Smile

-Pete

See also Yahoo group about applying RE.



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems