Announcement

Collapse
No announcement yet.

closeout trade everyday

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

  • closeout trade everyday

    I have an efs file code to do strategy buy, sell cover and short for 120 days. However, I think it would be better result if it knows how to closeout trade everyday. Anyone knows how to get it done would be greate.

    I am using 3 minutes interval and 9:30-16:00 EST time template

  • #2
    Hi Jchyr,

    Have you tried putting a routine in your Strategy that calls for getHour() and getMinute(), and some conditions such as if hour=x and minute=y and Strategy.isLong then sell etc.

    Just a suggestion, you would have to look up the actual syntax.

    Comment


    • #3
      Here is an example..

      PHP Code:
        var vRTHour;
        var 
      vRTMin;
        var 
      vRTSec
        
      var vHour;
        var 
      vMin;
        var 
      vSec;
        var 
      vDay;
        var 
      vMonth;

      function 
      main() {

        var 
      vTime = new Date();
      //---------------------------------------------------
      //  Get RT Time Variables
        
      vRTHour vTime.getHours();
        
      vRTMin vTime.getMinutes();
        
      vRTSec vTime.getSeconds();
      //---------------------------------------------------
      //  Get BAR Time Variables
        
      vTime getValue("Time"0);
        
      vHour vTime.getHours();
        
      vMin vTime.getMinutes();
        
      vSec vTime.getSeconds();
        
      vDay vTime.getDate();
        
      vMonth vTime.getMonth() +1;
        var 
      tTime = (vHour*100)+vMin;

      return;

      Brad Matheny
      eSignal Solution Provider since 2000

      Comment

      Working...
      X