Announcement

Collapse
No announcement yet.

EFS Scirpt and minute chart hanged

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

  • EFS Scirpt and minute chart hanged

    Hi

    I have an EFS script that compares daily/minute charts of a list of symbols.
    Here's how it looks like:

    var Symbols = new Array("0168-HKG", "0177-HKG", "0323-HKG", "0338-HKG", "0347-HKG", "0358-HKG", "0386-HKG");

    function main()
    {
    var i = 0;
    for (i = 0; i < Symbols.length; i++)
    {
    var CurrSymbol = Symbols[i];

    var CurrOpen = open(0, sym(CurrSymbol));
    var CurrClose = close(0, sym(CurrSymbol));
    var CurrHigh = high(0, sym(CurrSymbol));
    var CurrLow = low(0, sym(CurrSymbol));
    //Do some calculations ...
    }
    }

    I run the script in daily charts and 60 minute charts resided in a same page. There will be ~ 14 instances of the script running simultaneously each time.

    The problem is that from time to time, the script will hang at the mid-pont of running. The points at which they hang vary each time but seems that they are always in the 60 minute charts. The message freezed in the study pane of the chart window is "Data Loading ..." and there is no effect for reloading the script.

    What is worse is that after the script hanged, the 60-minute charts of the symbols having been loaded by the scripts seem to have problem rendering. The charts are either incomplete or simply blank. It looks like that the symbols are permernantly stuck.

    Is there anyone encountered the same problem?

    Thanks.

  • #2
    well, I don't know if this is a problem, but you are passing 7 symbols in your array and I believe the limit is 6.

    Also, it appears you are pulling this symbol data ON EVERY TICK in your main function. This will cause a HUGE DRAW on resources in your script. If you only need this data once per new bar or once at the current bar, I might suggest you try to clean up this script so that you are not calling this data EVERY TICK.

    Other than those problems, your code looks OK to me.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      bushchui,

      It has been confirmed and will be added to our tracking system. Thank you.
      Alex

      Comment


      • #4
        I finally changed the 60 minute charts to 30 minute charts and reduced the number of charts, and the problem didn't appear any more. It looks like the problem happens to 60 minute charts only.

        But now I got another problem with the same EFS script -- in daily charts, the last day the EFS script can get from the server is one day before the last trading day. E.g. when I ran the script on 13rd April, the last day the EFS script retrieved was 8th April, not 9th April, which is what I expected. This seems to happen in daily charts but not in 60 minute charts.

        Comment


        • #5
          bushchui
          What version and build of eSignal are you running?

          It looks like the problem happens to 60 minute charts only.
          You may want to provide some details about the Time Template used in those charts

          But now I got another problem with the same EFS script -- in daily charts, the last day the EFS script can get from the server is one day before the last trading day. E.g. when I ran the script on 13rd April, the last day the EFS script retrieved was 8th April, not 9th April, which is what I expected. This seems to happen in daily charts but not in 60 minute
          I just ran the sample script you provided [after having added a debug statement to output the collected data] and at my end it is returning the data for the 9th of April as you can see in the screenshot enclosed below which was captured using ver 10.4.1540
          You may want to post the complete script you are using so that eSignal's support can try to replicate the issue
          Alex




          Originally posted by bushchui
          I finally changed the 60 minute charts to 30 minute charts and reduced the number of charts, and the problem didn't appear any more. It looks like the problem happens to 60 minute charts only.

          But now I got another problem with the same EFS script -- in daily charts, the last day the EFS script can get from the server is one day before the last trading day. E.g. when I ran the script on 13rd April, the last day the EFS script retrieved was 8th April, not 9th April, which is what I expected. This seems to happen in daily charts but not in 60 minute charts.

          Comment


          • #6
            Corretions -- 30 minute charts are not OK. I ran the script a few more times in 30 minute charts and it hangs just like before. There is no improvement.

            For time templates, I am using the default one without any modification.

            Here's how they look like when I open the "Time Templates" menu.

            Moreover, the version I am using is 10.4.1540.
            Attached Files

            Comment

            Working...
            X