Announcement

Collapse
No announcement yet.

Can this be done?

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

  • Can this be done?

    I am not a programmer, but I think the API is the only solution to my problem. Any hints, clues (or even offer to construct for $$$) would be appreciated.

    I currently use an Excel macro to read rows of data from a text file into a spreadsheet. The macro parses the data by price, that is, it creates a volume profile. I do this at days end, manually.

    I would like to create a program that would take T&S data from the Esignal API and feed it into my spreadsheet. Unfortunately, I track the ES, so by the end of the day, there are too many trades to fit into a single sheet. My guess is I need to write the data to a file which then can be read by the macro (not elegant and read/write conflicts) or figure out a way to pipe the data into the spreadsheet in some way I can't conceive of.

    Any thoughts or ideas? I'm open to any suggestions.

  • #2
    Hi coolmoss,

    As I see it, there are two ways to do this without the API, in a relatively simple manner.

    The first would be to run an efs in Real time and record the data to a file. This would be relatively straightforward, however, if there were problems during the day with your machine, the file would be missing that information.

    The second would be to download tick data at the end of the day and use a macro to read this information.

    Here is an excerpt from a tick data file

    PHP Code:
    Symbol=ES #F
    Date=10/12/04-10/25/04
    Q
    ,041012,060000,1118.25,1118.5,72,2,    ,    
    T,041012,060003,1118.5,1,    
    Q,041012,060003,1118.25,1118.5,72,1,    ,    
    T,041012,060003,1118.5,1,    
    Q,041012,060003,1118.5,1118.75,4,74,    ,    
    T,041012,060004,1118.75,1,    
    T,041012,060004,1118.75,1,    
    T,041012,060004,1118.75,1,    
    Q,041012,060004,1118.5,1118.75,4,71,    ,    
    Q,041012,060004,1118.5,1118.75,5,71,    ,    
    Q,041012,060007,1118.5,1118.75,5,68,    ,    
    Q,041012,060010,1118.5,1118.75,6,68,    ,    
    Q,041012,060011,1118.5,1118.75,6,69,    ,    
    Q,041012,060015,1118.5,1118.75,6,70,    ,    
    T,041012,060017,1118.75,1,    
    T,041012,060017,1118.75,2,    
    T,041012,060017,1118.75,1,    
    T,041012,060017,1118.75,2,    
    T,041012,060017,1118.75,1,    
    T,041012,060017,1118.75,2,    
    T,041012,060017,1118.75,16,    
    Q,041012,060017,1118.5,1118.75,6,45,    ,    
    T,041012,060017,1118.75,4,    
    T,041012,060017,1118.75,10,    
    T,041012,060017,1118.75,3,    
    T,041012,060017,1118.75,8,    
    Q,041012,060017,1118.5,1118.75,6,20,    , 
    I hope this helps.

    Comment


    • #3
      Steve, thank you for your suggestions.

      I am doing what you say with the macro right now, I was hoping to do some intraday analysis.

      I didn't realize I could write tick data to a file from within an EFS. I need to distingquish trades occurring on the bid to those on the ask. Is there a flag in the tick data records you have shown here which indicate that? Also, would you mind, if not too much effort, describe the type of EFS command to do this.

      This next problem would be opening the file intraday. If the EFS is writing to the file almost continuously, would it screw things up if my Excel macro tried to read the file throughout the day.

      After having given many hours thought to what I considered to be a simple problem, I have a new respect for all the people who created esignal. Dealing with streaming data is indeed a pain.

      Comment


      • #4
        coolmoss,

        Take a look at this thread for some simple file access steps

        http://forum.esignalcentral.com/show...threadid=10703

        Depending how often you would want to write to a file, you may or may not want to close the file. What you could do is keep the file open all day and use the flush command to ensure the recent data in the buffer is written to the file.

        I have accessed this file with excel during the day, however, just by opening the file, from excel directly (not a macro). There were no problems with file sharing issues when I opened the file in that manner, however, I don't know if there would be any impact doing it as you described.

        Regarding bid and ask, I would think you would have to check if the trade is at the bid and ask, then credit that "bin" with the trade volume.

        Here is an excerpt from an efs entitled cumBidAskVol
        PHP Code:
        /*****************************************************************
        Provided By : eSignal. (c) Copyright 2003
        *****************************************************************/

        function preMain(){
            
        setPriceStudy(false);
            
        setStudyTitle(" Cumulative Bid/Ask Volume ");
            
        setCursorLabelName("Ask V"0);
            
        setCursorLabelName("Bid V"1);
            
        setDefaultBarFgColor(Color.red0);
            
        setDefaultBarFgColor(Color.lime1);
            
        setDefaultBarThickness(30);
            
        setDefaultBarThickness(31);
            
        setPlotType(PLOTTYPE_HISTOGRAM0);
            
        setPlotType(PLOTTYPE_HISTOGRAM1);
            
        addBand(0PS_SOLID1Color.black"zero");
        }

        var 
        bidVol 0;
        var 
        askVol 0;

        function 
        main() {
            if (
        getCurrentBarIndex() != 0) return;
            
            if(
        getDay() != getDay(-1)) {
                
        bidVol=0;
                
        askVol=0;
            }

            var 
        close();
            if(
        >= getMostRecentAsk()) askVol += getMostRecentTradeSize();
            if(
        <= getMostRecentBid()) bidVol += getMostRecentTradeSize();

            return new Array(
        bidVol, -askVol);

        All you have to figure out is how often you want to reset the bin and save the data to a file. I can help you with that.

        Comment


        • #5
          Thanks for this info Steve, it helps a lot. If anyone else has ideas or comments, I'd appreciate it.

          Comment


          • #6
            You could use the API to automate this process. It sounds like what you are doing be developed relatively quickly by one of the experienced developers on the forum. There are a few names of contractors I can send you, if you are interested in a more sophisticated application.

            Comment

            Working...
            X