Announcement

Collapse
No announcement yet.

Data delayed with Automation Enabled

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

  • Data delayed with Automation Enabled

    Hello all,

    Has anyone experienced delayed data once an EFS automation strategy has been enabled? For example, the chart will be 30 minutes behind the current time (i.e. the chart shows 12:00, while the current time is 12:30).

    Thanks

  • #2
    By the way, don't even call eSignal helpdesk. They will not help with any EFS issue.

    Comment


    • #3
      Originally posted by AndresPR View Post
      Hello all,

      Has anyone experienced delayed data once an EFS automation strategy has been enabled? For example, the chart will be 30 minutes behind the current time (i.e. the chart shows 12:00, while the current time is 12:30).

      Thanks
      Yes

      Unfortunately efs-at with delayed data is not usable
      The last traded price is actually not delayed
      In my case that was a total showstopper
      As you have a mismatch

      Comment


      • #4
        Originally posted by AdamS01 View Post
        Yes

        Unfortunately efs-at with delayed data is not usable
        The last traded price is actually not delayed
        In my case that was a total showstopper
        As you have a mismatch
        Thanks for all of your input Adam,

        I have literally been on a crash course to learn Javascript informally...I have only written code in third party languages. I do not understand what you mean by "mismatch". Can you clarify? Also, I may have not been clear with my explanation of the issue. I have 2 charts with the same ticker and time frame. One is without efs automation and the other has efs automation. Once the strategy is live, it quickly slows processing the new bars as time moves forward. While the efs free chart keeps up with the current time and sales/bars. I am guessing that there is too much demanding/unnecessary code that is draining the resources down to a crawl.

        Update to this issue: As I let the efs-Test Automation run, there was a massive updating of the chart and blasting of orders out as the chart and efs caught up with the data. Basically, the efs chart was behind an hour and in about 20 seconds updated the chart in a flash meanwhile submitting the orders for the code to execute.

        Comment


        • #5
          Andres, your last message sounds correct and consistent with my observations.

          The chart will call main() more frequently than you may realize. In order to prevent the chart updates from slowing down, I added a counter (global in scope) which tallies the number of time main() is called and then, every N times, allows order-related and other computational code to execute. Of course, deciding on the value of N is case-by-case. In my scripts, I change the value of N depending on real-time circumstances, but that might not be the right approach for you.

          You could also check out the callback function, such as OnExecutionUpdate, to see if you can move some code out of main() if that code only needs to execute when an order is filled or changed. There are other callback functions available too.

          Comment


          • #6
            Thanks for all of your inputs. I have rethunk what instructions I am putting into the script and in what order. Basically, I am only calling information WHEN I need it (i.e. Trade.getorders(), getDate(), etc).

            //ENTRY LONG
            if( high(0,inv(1)) > high(-1,inv(1)) &&
            low(0,inv(1)) > low(-1,inv(1)) &&
            currentOrderTime > (prevCurrentOrderTime - 10000))
            {nState = getBarState(); nBarIndex = getCurrentBarIndex();var orderIsBuy = false; var openOrders = Trade.getOrders({states:Order.STATE_WORKING | Order.STATE_PLACING | Order.STATE_WORKING | Order.STATE_UPDATING});
            if(openOrders != null) {
            for(var i=0, len=openOrders.length; i<len; i++){
            if(Order.isBuy(openOrders[i]) == true){orderIsBuy = true}else{orderIsBuy = false};};};
            if( nState == BARSTATE_NEWBAR &&
            nBarIndex == 0 &&
            orderIsBuy == false) {Trade.buyLimit(low() * .90);
            Trade.cancelAllShorts(sSymbol);
            today = new Date(); //debugPrintln("EL TODAY: " + today);
            now = today.getTime(); //debugPrintln("EL NOW: " + now);
            prevCurrentOrderTime = currentOrderTime;
            currentOrderTime = now; debugPrintln("EL Cur OT: " + currentOrderTime + " EL Prev OT: " + prevCurrentOrderTime);
            myFuncCalls = myFuncCalls + 1;
            debugPrintln("EL CALLS: " + myFuncCalls);}
            }

            And vice versa for the Short Order. Obviously, this is not a script to make money, but to learn. I will be cleaning up unnecessary lines for future scripts.

            Comment


            • #7
              Hi AndresPR

              Oh I see;
              Your charts are delayed as you have too much data processing in your EFS.
              Some EFS-AT calls take a lot of time to complete;
              As Omerpoteus suggested, I would move most of code to call back functions;

              I misunderstood you initially; I was thinking that you are using delayed data feed (the free one with no exchange fees)
              I was trying to run a lot of testing on delayed feed, but in this scenario EFS-AT is totally confused.
              You making a decision to enter the trade on 20 mins delayed data, but EFS-AT actually enters the trade on non delayed data.
              in this scenario charts are drown incorrectly as all executions are assumed to happening the future

              Comment

              Working...
              X