Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

New Post: engine.Evaluate in an event driven method

$
0
0
Thanks for writing this code. I just started playing with it and look forward to seeing what can be done.

I'm sure I'm missing something simple but I'm having issues using engine.Evaluate in an event driven method call (the event is new incoming market data). Exceptions are thrown, apparently, the second time engine.Evaluate is called to update a calculation.

I can recreate similar behavior using this simple example:
engine.Evaluate("a <- a+1");
NumericVector v1 = engine.GetSymbol("a").AsNumeric();
txtBox.Text = v1[0].ToString()
But if I run this:
engine.Evaluate("a <- 1");
NumericVector v1 = engine.GetSymbol("a").AsNumeric();
txtBox.Text = v1[0].ToString()
No exceptions are thrown no matter how many times that method is called.

Am I missing something basic? Thanks.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>