Tradestation can't do basic math?? Is its floating point reliable?

Discussion in 'Automated Trading' started by garchbrooks, Apr 22, 2010.

  1. Has anyone ever seen tradestation's EL package return bogus numbers from builtin functions like, say, the exponential moving average?

    I'm getting weird numbers where in one chart window it says one thing, but in another one, it gets a completely different value using the same set of data. The weird thing is that the same code works in tons of other "chart windows", but in one chart window, the number is totally off.

    Is there weirdness in how floating point data is marshaled back to TS from a DLL? Wondering if maybe the variables I'm using, even though they are printed out correctly, are being victimized by some strange artifact somewhere.
     
  2. Yeah, I am able to reproduce this error every time. I'm trying XAverage( Foo( alpha, beta ), period ) and
    XAverage( Foo_I( alpha, beta ), period )

    where the only difference between Foo and Foo_I is how they use 'Data1', 'Data2', and 'Data3' (since only the first symbol can be used to place orders.)

    Tradestation is not having any of it. The results work in 17 windows, but the 18th window returns bad data.
     
  3. make sure your bars back settings are the same on all charts and that all charts actually have the same number of bars. for instance, a 50 period EMA placed on 100 bars will give a slightly different value that if it is placed on 400 bars. this is probably the source of the problem.

     
  4. I have 1-min charts going back 6 months, there's plenty of bars. The value error is on the last bar, so I know there's more than enough data. It's only happening on one wacked out symbol, too. (BUCY.)

    Is there a way to flush the local data cache for a symbol? It seems to be drawn correctly, but the numbers are just totally warped.
     
  5. montysky

    montysky

    another thing I can think of is the session time: is it regular session or 24-hour session?
     
  6. montysky

    montysky

    go to view-refresh to flush out the cached data
     
  7. This fixed it. Thank you so much. I was losing my mind, not trusting the computer, doing floating point arithmetic by hand. I have enough mental damage, Tradestation is not helping!!!

    Thank you, thank you, thank you.
     
  8. The weird thing about this is that sometimes I refresh and I get garbled data, other times I refresh and I get perfectly fine information.
     
  9. montysky

    montysky

    Glad to see that took care of your problem. mmm, I don't recall getting garbled data after a refresh-reload. I've been using TS for many years now, their data is usually pretty good. Maybe it's something else.

    I have encountered a few times when refresh-reload doesn't work however. Manually deleting the data files for that symbol usually does the trick.