Announcement

Collapse
No announcement yet.

Same EFS, Multiple symbols

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

  • Same EFS, Multiple symbols

    I have an es file I want to use to trade es AND nq.

    Can I run the same efs file in two different adv charts and expect it to work?

    First try looked like the system was getting confused, cuz the output the to the Formula Output was messed up.

    So I tried to give the second efs file a different name and then run it. Same output.

    Am I missing something?

  • #2
    Hi David,

    Please post your efs to file share so I can try this with your efs.

    Thanks,
    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


    • #3
      located in the SimCon file area

      PHP Code:
      var masum=0;var count=0;var time=0;var tiold;

      function 
      preMain(){setPriceStudy(true);}

      function 
      main(maLenmaMin)
      {
      if (
      getCurrentBarIndex()== -4)
      {
      debugClear();

      if(
      maLen==null){var maLen=50;}
      if(
      maMin==null){var maMin=5;}

      var 
      curInt=getInterval();
      var 
      curIntLen=curInt.length;

      if(
      curIntLen>3)
      {
      debugPrintln("IntLen too long");return;}

      if(
      curIntLen==3)    //i.e. 30S
      {
      var 
      IntRaw curInt.substring(02);debugPrintln("IntRaw= "+IntRaw);    //strip off 1st two characters

      var timeframe curInt.substring(23);    //check for S econds
      debugPrintln("timeframe= "+timeframe);

      intOK=((maLen*60/IntRaw)%1);      //number of bars in a complete maLen
      debugPrintln("intOK= "+intOK);

      if(
      intOK!=0||timeframe!="S"){debugPrintln(curInt+" is a Bad Interval");return;}}

      if(
      curIntLen==2)    //i.e. 5S
      {
      var 
      IntRaw curInt.substring(01);debugPrintln("IntRaw= "+IntRaw);

      var 
      timeframe curInt.substring(12);    //check for S econds
      debugPrintln("timeframe= "+timeframe);

      intOK=((maLen*60/IntRaw)%1);debugPrintln("intOK= "+intOK);

      if(
      intOK!=0||timeframe!="S"){debugPrintln(curInt+" is a Bad Interval");return;}}

      debugPrintln(curInt+" is a Good Interval");

      nNum=maMin/(IntRaw/60)*(maLen);debugPrintln("nNum= "+nNum);

      for(
      i=0i<nNumi++) 
      {
      var 
      hr=getValue("Hour",-i,1);   debugPrintln("hr= "+hr);
      var 
      min=getValue("Minute",-i,1);debugPrintln("min= "+min);
      //var sec=IntRaw;
      var sec=getValue("Second",-i,1);debugPrintln("sec= "+sec);

      timex=hr*10000+min*100+sec*1;  debugPrintln("timex= "+timex);

      var 
      time=hr*1+min/60+sec/3600debugPrintln("time= "+time);

      timediff=time-9.5;debugPrintln("timediff= "+timediff);

      timeintervals=Math.round(timediff/(IntRaw/3600));

      if(
      timeintervals==tiold)
      {
      timeintervals=tiold-1;
      }
      tiold=timeintervals;
      debugPrintln("timeintervals= "+timeintervals);

      timeoffset=(timeintervals)%(maMin*60/IntRaw);
      timeoffset=timeoffset-timeoffset%1;
      debugPrintln("timeoffset= "+timeoffset);

      var 
      testc=getValue("Close",-timeoffset,1);debugPrintln("testc= "+testc);
      debugPrint("h:m:s="+hr+":"+min+":"+sec+" "+"timeoffset= "+timeoffset+" ");
      //return;
      //for (i = 0; i < nNum; ++i) 
      //{

      //minsince=min%maMin;
      //debugPrintln("minsince= "+minsince);

      //var secSum=(minsince*60+sec*1);

      //var offset=(secSum-(secSum%IntRaw))/IntRaw;
      //if(secSum<IntRaw)
      //{
      if(count<maLen&&timeoffset==0)
      {
      var 
      maval=getValue("Close",-i,1);
      debugPrintln("maval= "+maval);
      count=count+1;
      masum=masum*1+maval*1;
      debugPrintln("count= "+count+" masum= "+masum/50);
      }
      }
      //}



      }//return masum;

      Comment

      Working...
      X