Announcement

Collapse
No announcement yet.

time settings

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

  • time settings

    Because I trade Forex How can I change the time setting on the system to reflect the NY closing as the end of day, for example.

    In other word the date will change at the end of NY close, without modifying my computer setting

    Thank you
    Last edited by richbois; 06-30-2005, 04:54 PM.

  • #2
    richbois
    Assuming I understood your question correctly you cannot change the date
    Alex


    Originally posted by richbois
    Because I trade Forex How can I change the time setting on the system to reflect the NY closing as the end of day, for example.

    In other word the date will change at the end of NY close, without modifying my computer setting

    Thank you

    Comment


    • #3
      You understood Thank you

      what I am trying to do is in Pivot Point formula, it does calculations based on ,D but that date is based on the time and date on my computer.

      if I want to change that to Forex NY close for example or UTC+2 would also work . how do I do that

      I tried changing DATE to UTCDate but that didn't work

      I am new at this Java scrip stuff.

      I have managed to do some mods in there already this is my last hurdle.

      Thanks for your help

      Comment


      • #4
        richbois
        I am not sure that being able to change the date would provide you with what you want because the formula you mention uses the daily bar to compute the Pivot and that daily bar will include the new session's data until the midnight reset.
        What you would need to do is write an efs that will store the highest High and lowest Low that is on the chart starting from the NY open time to the NY close of the next day and then track the last Close of this period. Once you have these three values you can define the Pivots. Note that these may be marginally different from the ones calculated using the Daily bar as the intraday Close may be slightly different.
        You can see one way of doing part of this in the hilo_overnight.efs attached to this post. While it may not be a very elegant script I don't know of another one that accomplishes the same (or similar) task. Anyhow you can try to modify it to your requirements.
        Alex


        Originally posted by richbois
        You understood Thank you

        what I am trying to do is in Pivot Point formula, it does calculations based on ,D but that date is based on the time and date on my computer.

        if I want to change that to Forex NY close for example or UTC+2 would also work . how do I do that

        I tried changing DATE to UTCDate but that didn't work

        I am new at this Java scrip stuff.

        I have managed to do some mods in there already this is my last hurdle.

        Thanks for your help

        Comment


        • #5
          Thank you for your answers and I have reviewed the tread that you cited.

          in the help sections it mentions UTC time fonctions.

          is there a way to insert a set time feature in the formula that would state that the calculations are done on the bases of UTC time +2 or what ever time diff I would need

          Thanks again

          Comment


          • #6
            richbois
            That efs does not use the Date Object for its calculations but only bar times
            Alex


            Originally posted by richbois
            Thank you for your answers and I have reviewed the tread that you cited.

            in the help sections it mentions UTC time fonctions.

            is there a way to insert a set time feature in the formula that would state that the calculations are done on the bases of UTC time +2 or what ever time diff I would need

            Thanks again

            Comment


            • #7
              when I set my computer on UTC +2 the calculations for pivots return what I am looking for

              therefore how do i set bartime at UTC +2 and get Highs Lows Closes based on that

              thank again

              Richard

              Comment


              • #8
                Richard
                Chart time offset is currently not available in eSignal. You may want to send your suggestions or requests for enhancements to [email protected].
                Alex


                Originally posted by richbois
                when I set my computer on UTC +2 the calculations for pivots return what I am looking for

                therefore how do i set bartime at UTC +2 and get Highs Lows Closes based on that

                thank again

                Richard

                Comment


                • #9
                  need help with this one

                  ok now I found some different formulas on the site and put them all together and came up with this new formula.

                  it does every thing I want except repeat my pivot point calculations to previous days

                  the part about printing a line at Xtime and start a new day works fine and the HLC prints for the last full day and the pivots print for the coming day. that's all great.

                  wonder if you looked at this script if you could tell me what am I doing wrong in order to make it do the same on prvious days like the normal pivot formula does

                  I realy appreciate the help since I am new at this EFS programming but trying hard

                  Thanks again for all your help

                  PHP Code:
                  function preMain() {
                      
                  setPriceStudy(true);
                      
                  setStudyTitle("HiLo");
                      
                  setCursorLabelName("ETH High"0);
                      
                  setCursorLabelName("ETH Low"1);
                      
                  setPlotType(PLOTTYPE_FLATLINES,0);
                      
                  setPlotType(PLOTTYPE_FLATLINES,1);
                      
                  setDefaultBarFgColor(Color.blue,0);
                      
                  setDefaultBarFgColor(Color.red,1);
                      
                  setStudyTitle("New Trading Day Marker W/HLC and Pivot Points");
                      
                  setShowCursorLabel(false);
                      
                      var 
                  fp = new FunctionParameter("nHr"FunctionParameter.STRING);
                      
                  fp.setName("Set Hour");    
                      
                  fp.setDefault("14");
                  }

                  var 
                  vHr null;
                  var 
                  newDay true;
                  var 
                  dayCntr 0;
                  var 
                  vClose;
                  var 
                  vHigh;
                  var 
                  vLow;
                  var 
                  BarCntr 0;
                  var 
                  bartotal 0;
                  var 
                  PP null;

                  function 
                  main(nHr) {

                      var 
                  nState getBarState();
                      var 
                  vInt getInterval();
                      if (
                  vInt == "D" || vInt == "W" || vInt == "M" || vInt == "1") return;
                      
                      if (
                  nState == BARSTATE_NEWBAR) {
                          if (
                  newDay == false && getDay() != getDay(-1) && getDay(-1) != nullnewDay true;
                          if (
                  newDay == true) {
                              var 
                  barHr getHour()+"";
                              if (
                  barHr != null && barHr 10barHr "0"+barHr;
                              if(
                  barHr >= nHr ) {
                                  
                  drawLineRelative(0,0,0,99999,PS_DOT1Color.blue"NewDay"+dayCntr);
                                  
                  drawShapeRelative(05Shape.DIAMONDnullColor.blueShape.RELATIVETOBOTTOM"NewDay"+dayCntr);
                                  
                  //if (getBarState() == BARSTATE_NEWBAR)
                                  
                  if ( barHr nHr vClose close(-1)
                                      
                  BarCntr +=1;
                                      
                  vHigh high();
                                      
                  vLow low();
                                      for (
                  01440/vInt ; ++i) {
                                          
                  vHigh Math.max(high(-i), vHigh);
                                          
                  vLow Math.min(low(-i), vLow);
                                          
                  PP = ((vClose+vHigh+vLow)/3)
                                          
                  R1 = (2*PP)-vLow
                                          S1 
                  = (2*PP)-vHigh
                                          R2 
                  = (PP-S1)+R1
                                          S2 
                  PP-(R1-S1)
                                          
                  MPR1 = (PP+R1)/2
                                          MPS1 
                  = (PP+S1)/2
                                          MPR2 
                  = (R1+R2)/2
                                          MPS2 
                  = (S1+S2)/2
                                          R3 
                  = (2*PP)+(vHigh-(2*vLow))
                                          
                  S3 = (2*PP)-((2*vHigh)-vLow)
                                          
                  MPR3 = (R2+R3)/2
                                          MPS3 
                  = (S2+S3)/2
                                          
                  //drawLineRelative(-1440/vInt, vHigh, 0, vHigh, PS_SOLID, 2, Color.red, "High");
                                          //drawLineRelative(-1440/vInt, vLow, 0, vLow, PS_SOLID, 2, Color.green, "Low");
                                          //drawLineRelative(-1440/vInt, vClose, 0, vClose, PS_SOLID, 2, Color.black, "Close");
                                          
                  drawLineRelative(1440/vIntR30R3PS_DASH2Color.red"R3");
                                          
                  drawLineRelative(1440/vIntMPR30MPR3PS_DASH1Color.green"MPR3");
                                          
                  drawLineRelative(1440/vIntR20R2PS_DASH1Color.blue"R2");
                                          
                  drawLineRelative(1440/vIntMPR20MPR2PS_DASH1Color.green"MPR2");
                                          
                  drawLineRelative(1440/vIntR10R1PS_DASH1Color.red"R1");
                                          
                  drawLineRelative(1440/vIntMPR10MPR1PS_DASH1Color.green"MPR1");
                                          
                  drawLineRelative(1440/vIntPP0PPPS_SOLID2Color.black"PP");
                                          
                  drawLineRelative(1440/vIntMPS10MPS1PS_DASH1Color.green"MPS1");
                                          
                  drawLineRelative(1440/vIntS10S1PS_DASH1Color.red"S1");
                                          
                  drawLineRelative(1440/vIntMPS20MPS2PS_DASH1Color.green"MPS2");
                                          
                  drawLineRelative(1440/vIntS20S2PS_DASH1Color.blue"S2");
                                          
                  drawLineRelative(1440/vIntMPS30MPS3PS_DASH1Color.green"MPS3");
                                          
                  drawLineRelative(1440/vIntS30S3PS_DASH2Color.red"S3");
                                          
                  dayCntr += 1;
                                          
                  newDay false;   
                                      }
                                  }
                              }
                      return 
                  PP;
                      }

                  Last edited by richbois; 07-15-2005, 05:38 PM.

                  Comment


                  • #10
                    Richard
                    The reason you are getting only the last set of lines drawn is because you are setting a unique tag ID for each drawLineRelative() command. For example

                    PHP Code:
                    drawLineRelative(1440/vIntR30R3PS_DASH2Color.red"R3"); 
                    What you need to do is add a counter to the tag ID so as to allow multiple graphical objects for the same ID to be drawn. Given that you already have a counter running in your efs ie BarCntr then add that to the tag ID parameter as follows

                    PHP Code:
                    drawLineRelative(1440/vIntR30R3PS_DASH2Color.red"R3"+BarCntr); 
                    Repeat with each drawLineRelative() command and you should see that also past lines will be drawn
                    Alex

                    Originally posted by richbois
                    ok now I found some different formulas on the site and put them all together and came up with this new formula.

                    it does every thing I want except repeat my pivot point calculations to previous days

                    the part about printing a line at Xtime and start a new day works fine and the HLC prints for the last full day and the pivots print for the coming day. that's all great.

                    wonder if you looked at this script if you could tell me what am I doing wrong in order to make it do the same on prvious days like the normal pivot formula does

                    I realy appreciate the help since I am new at this EFS programming but trying hard

                    Thanks again for all your help

                    PHP Code:
                    function preMain() {
                        
                    setPriceStudy(true);
                        
                    setStudyTitle("HiLo");
                        
                    setCursorLabelName("ETH High"0);
                        
                    setCursorLabelName("ETH Low"1);
                        
                    setPlotType(PLOTTYPE_FLATLINES,0);
                        
                    setPlotType(PLOTTYPE_FLATLINES,1);
                        
                    setDefaultBarFgColor(Color.blue,0);
                        
                    setDefaultBarFgColor(Color.red,1);
                        
                    setStudyTitle("New Trading Day Marker W/HLC and Pivot Points");
                        
                    setShowCursorLabel(false);
                        
                        var 
                    fp = new FunctionParameter("nHr"FunctionParameter.STRING);
                        
                    fp.setName("Set Hour");    
                        
                    fp.setDefault("14");
                    }

                    var 
                    vHr null;
                    var 
                    newDay true;
                    var 
                    dayCntr 0;
                    var 
                    vClose;
                    var 
                    vHigh;
                    var 
                    vLow;
                    var 
                    BarCntr 0;
                    var 
                    bartotal 0;
                    var 
                    PP null;

                    function 
                    main(nHr) {

                        var 
                    nState getBarState();
                        var 
                    vInt getInterval();
                        if (
                    vInt == "D" || vInt == "W" || vInt == "M" || vInt == "1") return;
                        
                        if (
                    nState == BARSTATE_NEWBAR) {
                            if (
                    newDay == false && getDay() != getDay(-1) && getDay(-1) != nullnewDay true;
                            if (
                    newDay == true) {
                                var 
                    barHr getHour()+"";
                                if (
                    barHr != null && barHr 10barHr "0"+barHr;
                                if(
                    barHr >= nHr ) {
                                    
                    drawLineRelative(0,0,0,99999,PS_DOT1Color.blue"NewDay"+dayCntr);
                                    
                    drawShapeRelative(05Shape.DIAMONDnullColor.blueShape.RELATIVETOBOTTOM"NewDay"+dayCntr);
                                    
                    //if (getBarState() == BARSTATE_NEWBAR)
                                    
                    if ( barHr nHr vClose close(-1)
                                        
                    BarCntr +=1;
                                        
                    vHigh high();
                                        
                    vLow low();
                                        for (
                    01440/vInt ; ++i) {
                                            
                    vHigh Math.max(high(-i), vHigh);
                                            
                    vLow Math.min(low(-i), vLow);
                                            
                    PP = ((vClose+vHigh+vLow)/3)
                                            
                    R1 = (2*PP)-vLow
                                            S1 
                    = (2*PP)-vHigh
                                            R2 
                    = (PP-S1)+R1
                                            S2 
                    PP-(R1-S1)
                                            
                    MPR1 = (PP+R1)/2
                                            MPS1 
                    = (PP+S1)/2
                                            MPR2 
                    = (R1+R2)/2
                                            MPS2 
                    = (S1+S2)/2
                                            R3 
                    = (2*PP)+(vHigh-(2*vLow))
                                            
                    S3 = (2*PP)-((2*vHigh)-vLow)
                                            
                    MPR3 = (R2+R3)/2
                                            MPS3 
                    = (S2+S3)/2
                                            
                    //drawLineRelative(-1440/vInt, vHigh, 0, vHigh, PS_SOLID, 2, Color.red, "High");
                                            //drawLineRelative(-1440/vInt, vLow, 0, vLow, PS_SOLID, 2, Color.green, "Low");
                                            //drawLineRelative(-1440/vInt, vClose, 0, vClose, PS_SOLID, 2, Color.black, "Close");
                                            
                    drawLineRelative(1440/vIntR30R3PS_DASH2Color.red"R3");
                                            
                    drawLineRelative(1440/vIntMPR30MPR3PS_DASH1Color.green"MPR3");
                                            
                    drawLineRelative(1440/vIntR20R2PS_DASH1Color.blue"R2");
                                            
                    drawLineRelative(1440/vIntMPR20MPR2PS_DASH1Color.green"MPR2");
                                            
                    drawLineRelative(1440/vIntR10R1PS_DASH1Color.red"R1");
                                            
                    drawLineRelative(1440/vIntMPR10MPR1PS_DASH1Color.green"MPR1");
                                            
                    drawLineRelative(1440/vIntPP0PPPS_SOLID2Color.black"PP");
                                            
                    drawLineRelative(1440/vIntMPS10MPS1PS_DASH1Color.green"MPS1");
                                            
                    drawLineRelative(1440/vIntS10S1PS_DASH1Color.red"S1");
                                            
                    drawLineRelative(1440/vIntMPS20MPS2PS_DASH1Color.green"MPS2");
                                            
                    drawLineRelative(1440/vIntS20S2PS_DASH1Color.blue"S2");
                                            
                    drawLineRelative(1440/vIntMPS30MPS3PS_DASH1Color.green"MPS3");
                                            
                    drawLineRelative(1440/vIntS30S3PS_DASH2Color.red"S3");
                                            
                    dayCntr += 1;
                                            
                    newDay false;   
                                        }
                                    }
                                }
                        return 
                    PP;
                        }

                    Comment


                    • #11
                      Thank you

                      well Alex you know your stuff I had been looking for the problem for days and you fixed it in just a few minutes

                      That is great THANK YOU VERY MUCH IT FINALY WORKS

                      Richard

                      Comment


                      • #12
                        Richard
                        Glad to hear it works and you are most welcome
                        Alex


                        Originally posted by richbois
                        well Alex you know your stuff I had been looking for the problem for days and you fixed it in just a few minutes

                        That is great THANK YOU VERY MUCH IT FINALY WORKS

                        Richard

                        Comment

                        Working...
                        X