Announcement

Collapse
No announcement yet.

How do I get technical indicators data?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I get technical indicators data?

    I checked "Desktop API - Appendix A.doc " and "Desktop API - Brokerage Integration SDK.zip" and did not see any technical indicator accessors. My program needs to check for EMA crossovers, and I do not want to implement EMA's in my code because, I assume, eSignal is doing that for me somewhere. Can you tell me where should I look for thos functions at?

    Thanks

  • #2
    The API does not include any technical analysis functions (or access to EFS functions). If you need them in your API-based application, you will have to calculate them yourself.

    Cheers... George

    Comment


    • #3
      How does eSignal charts do it then?

      The problem with calculating your own indicators is that you need a reference point (EMA(prev)). How does eSignal's backend calcualtes EMA values, in other words, what does it use a prev value in EMA(prev)? Or does it just go back hours/days of data and start counting from there to approximate those values? Basically how does eSignal calculate those pesky EMAs when I punch up a chart?

      Thanks

      Comment


      • #4
        You have the array of prices, so you should know EMA(prev) yourself, since you calculated it. The only one you won't know is for the very first data point in the serious. In that case you just have to use an appropriate initializer. In the case of the EMA, I simply use the first price in the array as the initializer because chances are the price before it was pretty close. I don't know what eSignal uses, but it must be something similar.

        Cheers... George
        Last edited by GenSpoo; 04-15-2005, 12:17 PM.

        Comment


        • #5
          Hello George\Steve,

          We prime the calculation by doing a simple moving average for the first data point. Please visit EMAcalc to see an example using EFS code.

          Last edited by GenSpoo; 04-15-2005, 01:09 PM.
          Jason K.
          Project Manager
          eSignal - an Interactive Data company

          EFS KnowledgeBase
          JavaScript for EFS Video Series
          EFS Beginner Tutorial Series
          EFS Glossary
          Custom EFS Development Policy

          New User Orientation

          Comment


          • #6
            The simple moving average of one price is the price itself. So what are you averaging for the first point? That's why I said to just use the first price as the value. Or maybe I'm confused by what you mean.

            Cheers... George


            [Ooops... Didn't mean to insert that into your message Jason. Sorry. Not sure anyone noticed.]

            Comment


            • #7
              Hi George,

              No problem.

              After a certain number of bars are processed the EMA value would come out to be the same number using either method. At any rate, our MA studies have a Length parameter. So if the length is set to 10, we take the first 10 prices to calculate the SMA for that first data point and then go from there.
              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment


              • #8
                Gotcha. So the first n-period points of the EMA are actually SMA. I was trying to figure out how you took a 10 period SMA of one point of data.

                I think a key point to understand (and I'm sure most do understand it) is that most indicators take a certain number of bars to be processed before they are "accurate". You wouldn't want to trade the crossing of a 50 period SMA if you had only processed 25 bars so far. Until the time were the indicator "stabalizes", it isn't valid. Always make sure you request enough historical data to stabalize the indicator.

                Ideally the method you use to initialize (a.k.a. prime) the indicator should be the one that stabalizes the indicator the fastest (if there is one that does). For the EMA you could use just the first price like I do, or the SMA like eSignal does. Both will work fine. What you wouldn't want to do, as a bad example, is use zero. It would eventually stabalize, but would most likely take longer than the other methods.

                Cheers... George

                Comment

                Working...
                X