Announcement

Collapse
No announcement yet.

EFS feature request

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

  • EFS feature request

    Due to the issues of resource usage even with the getMinute() and getHour() functions, much less the older getValue("time") functions I think it would be great if we have a method to tell the EFS engine itself to alert us when a specific time was hit.

    eg:

    SetAlertOnTime(hh:mm, function to call);

    so:

    SetAlertOnTime(13:10, fAtEOD());

    Would call our fAtEOD() function (End Of Day function) each and everytime it was 1:30pm (but only on the first tick for that time).

    Similarly:

    SetAlertOnTime(6:30, fAtSOD());

    Would call our fAtSOD function (Start Of Day) function eachand every time it was 6:30am (or the first tick after 6:30 if there was no 6:30 tick).

    I'm assuming of course that the issue related to EFS date object creation will not be an issue for the engine itself...

    Thanks!

    Garth
    Garth

  • #2
    Hello Garth,

    Great suggestion. I've submitted this request to the development team. You may also want to submit your request to [email protected].
    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
      This is a new feature request I believe. What I am looking for is a cross between the functions drawTextRelative() and drawTextPixel().

      What I want is to be able to stick some labels at a fixed height in the price pane similar to what you can do with drawTextPixel(), yet I want the label to stick with the associated bar similar to drawTextRelative().

      Now if I wanted to stick it in the non-price pane it would behave similarly, kind of, however, the efs I want it in is already writing in the price pane, and I do not want to write a seperate redundant efs.

      I went ahead and submitted this to [email protected]. If anyone knows how to do this already, pls advise.

      TIA,

      Comment


      • #4
        Looks like the feature already exists, someone sent me this note "Can't you already do that with drawTextRelative using a fixed value for the y-axis with a Text.RELATIVETOBOTTOM (or Text.RELATIVETOTOP) flag and the relative bar index for the x-axis?"

        Subsequently we put together this efs that demonstrates what I was doing and then what I wanted to do using Text.RELATIVETOBOTTOM

        PHP Code:
        var barcount 0;
        var 
        init false;
        var 
        testarray = new Array(-5,-10,-15,-20,-25);
        var 
        colorarray = new Array(Color.red,Color.blue,Color.green,Color.black,Color.brown);

        function 
        preMain(){
            
        setPriceStudy(true);
            
        setShowTitleParameters(false);
            
        setStudyTitle("Vert lines");
            
        setShowCursorLabel(false);
         
        }
        function 
        main(){

            if (
        getBarState() == BARSTATE_ALLBARS) {//true once during initial load and subsequent reload
                
        barcount 0;
            }
            
        //if (getCurrentBarIndex() < -2 )return;
            
            
        if (getBarState() == BARSTATE_NEWBAR) {     

                
                
                
            }
            if (
        getCurrentBarIndex() == && init == false ){
                
        init true;
                var 
        i;
                
        //DONE THE WAY I ORIGINALLY HAD IT
                
        for (i=0;i<testarray.length;i++){
                    
        addLineTool(LineTool.VERTtestarray[i], 3colorarray[i], "vert"+i);
                    
        drawTextRelative(testarray[i], low(testarray[i])-1.5icolorarray[i], null,Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert1"+i);
                    
        drawTextRelative(testarray[i], low(testarray[i])-1.75close(testarray[i]), colorarray[i], null,Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert2"+i);
                    
        drawTextRelative(testarray[i], low(testarray[i])-2timec(testarray[i]), colorarray[i], null,Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert3"+i);
                }
                
        // DONE THE WAY I WANTED
                
        var nPixHeight getTextHeight"A""Comic Sans MS"13);
                for (
        i=0;i<testarray.length;i++){
                    
        //addLineTool(LineTool.VERT, testarray[i], 3, colorarray[i], "vert"+i);
                    
        drawTextRelative(testarray[i], 20+nPixHeight*2icolorarray[i], null,Text.RELATIVETOBOTTOM|Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert01"+i);
                    
        drawTextRelative(testarray[i], 20+nPixHeightclose(testarray[i]), colorarray[i], null,Text.RELATIVETOBOTTOM|Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert02"+i);
                    
        drawTextRelative(testarray[i], 20timec(testarray[i]), colorarray[i], null,Text.RELATIVETOBOTTOM|Text.CENTER|Text.VCENTER|Text.FRAME"Comic Sans MS"13,  "vert03"+i);
                }
            }

        //put stuff u want implemented every tick in here

        //
        }

        function 
        timec(n){// bar time
            
        ntime = (getHour(n)+":"+getMinute(n)+":"+getSecond(n));
            return 
        ntime;

        Comment

        Working...
        X