Announcement

Collapse
No announcement yet.

Next Candle Close Display on Chart

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

  • Next Candle Close Display on Chart

    Is there a way you can display the time of Next candle close somewhere in the chart?

    Attached is an example, the time was done in MSpaint and it's not correct time
    Attached Files
    Last edited by ketoma21; 07-30-2003, 04:06 PM.

  • #2
    Hello ketoma21,

    How about in the cursor window instead? Try out the following formula, nextBarTime.efs. It will work on any interval that is in minutes.

    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle(" Next Bar Time ");
        
    setCursorLabelName("Next Bar");
    }

    var 
    sNextBar "";

    function 
    main() {
        var 
    nState getBarState();
        var 
    nInt getInterval();
        
        if (
    nState == BARSTATE_NEWBAR) {
            var 
    vHr getHour();
            var 
    vMin getMinute();
            
    vMin = (vMin)*+ eval(nInt) + "";
            if (
    vMin >= 60) {
                
    vHr = eval(vHr) + "";
                
    vMin = eval(vMin) - 60 "";
            }
            if (
    vMin.length 2) {
                if (
    vMin == "0") {
                    
    vMin "00"
                
    } else {
                    
    vMin "0" vMin;
                }
            }
            
    sNextBar vHr ":" vMin;
        }
        
        return 
    sNextBar;

    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
      Hello Jason

      Thank you very much, works great.

      I added this line before the return function and that did the trick, now I have it in the cursor window and on the chart.

      drawTextAbsolute( 0, 15, "Close: " + sNextBar, null, null, Text.BOLD | Text.BUTTON | Text.RELATIVETOLEFT | Text.RELATIVETOBOTTOM, "Arial", 12, 1 );
      Attached Files

      Comment


      • #4
        current time

        Is there a way to incorporate the current time next to the Close of next bar you added on the chart? The current time much like the system time at the bottom left of Esig?
        morph

        Comment


        • #5
          morpheus
          You can try the enclosed efs
          Alex

          PHP Code:
          function preMain() {
              
          setPriceStudy(true);
              
          setStudyTitle("Time");
              
          setShowCursorLabel(false)
             
          }
          function 
          main() {
              var 
          xTime = new Date();
              
          drawTextRelative(6close(),xTime.getHours()+":" xTime.getMinutes()+":"xTime.getSeconds() , 
                              
          Color.bluenullText.VCENTER"MS Sans Serif"101);
              return ;

          Comment


          • #6
            Time

            Is there a way to incorporate the current time left for the current bar? In mm:ss format next to the Close of next bar ?

            Like a countdown?

            jonti

            Comment


            • #7
              Hi Jonti,

              Here is the EFS I use for what you are describing. Please let me know if this is what you were looking for.
              Attached Files

              Comment

              Working...
              X