MGrammer: Quick Trade Entry

So I’ve download the Oslo SDK. I’ve read MGrammer in a Nutshell, fired up Intellipad and bashed out my “Quick Trade Entry” grammer. Since I can compile my grammer, I guess all I need to do now is remove the current Quick Trade entry parser from my .NET trading application, load the .mgx image file, extract the XAML, and create an instance of the DynamicParser type that is configured as per the XAML by calling the LoadParserFromMgx method of the MGrammarCompiler.

Why am I doing the above? Most front office trading applications offer some mode of quick trade entry over the standard ticket that requires the traders to select multiple combo box’s, tabs etc. Trader’s usual hate the mouse, and prefer to live by the keyboard (just look at
Bloomberg). Quick trade entry within any trading applications usually involves writing a simple parser that over time become complex over time due to new traders requirements). MGrammer would seem a natural substitute for the home grown parser.

Another area that Oslo may help in is the logic that lives between components on a trade ticket. These UI components often have to dynamically change based on other selections within the ticket.

~ by mdavey on November 2, 2008.

4 Responses to “MGrammer: Quick Trade Entry”

  1. Thanks for this info. I never heard of MGrammar before. Interesting stuff…

    I’m currently developing a limited front-end trading app to streamline the collection of trade data from the portfolio manager. I noticed that it does take a lot of mouse clicks to enter a trade. Do you have any more information on developing a front-end interface or could you point me to any links that might be helpful?

  2. mg.exe will also emit c# that is only dependent on System.Dataflow.dll, which I suspect this be part of .net 4.0, not sure about silverlight 3…

    i haven’t had much luck with the c# source version, the emitted source is broken and doesn’t parse the same as a DynamicParser loaded from an mgx… but at least it doesn’t need the full oslo sdk ;)

  3. This is how I’m parsing some IDL files using Oslo (in F#), using a wrapper to patch up the IDL’s #ifdefs with ones that the Mg preprocessor supports (closer to C#’s than C/C++):

    let idlParser = MGrammarCompiler.LoadParserFromMgx(@”c:\temp\idl.mgx”, “WebKit.IDL”)

    let parse fileName =
    let s = readSource fileName
    let parser = Microsoft.Languages.PreprocessorParser()
    use reader = new StringReader(s)
    let defines = [| "LANGUAGE_CPPCLI" |]
    use preprocessor = new Preprocessor(fileName, parser, reader, defines, ErrorReporter.Standard)
    idlParser.ParseObject(fileName, preprocessor, ErrorReporter.Standard)

    let tree = parse @”c:\temp\foo.idl”

  4. [...] you just have large fingers.  Maybe you serve some traders, through a trade-entry language, and they have large fingers.  Whatever the reason, humans misspell [...]

Leave a Reply