Announcement

Collapse
No announcement yet.

Close Indicator

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

  • Close Indicator

    exist a close indicator for the last bar???
    tnx

  • #2
    sante
    The script enclosed below will write the most recent trade on the chart.
    Alex

    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("LastTrade");
        
    setShowCursorLabel(false); 
    }

    function 
    main() {

        var 
    Price formatPriceNumber(getMostRecentTrade());

        
    drawTextRelative(2,getMostRecentTrade(),"t",Color.blue,null,Text.VCENTER,"Wingdings 3",8,1);
        
    drawTextRelative(4,getMostRecentTrade(), PriceColor.blue,null,Text.VCENTER,"Arial",10,2);

        return;

    Comment


    • #3
      Great piece of code - already started using it - but is it possible to cut down decimal places - sometimes it prints a whole load of 0s with a 1 at the end.

      Paul.

      Comment


      • #4
        Paul
        I have edited the script and it will now use the price format of the symbol being charted.
        Copy it again from the prior message
        Alex

        Comment


        • #5
          Get this syntax error:

          SyntaxCheck, line 12: Parameter Number 3 of Function drawTextRelative is invalid

          Comment


          • #6
            Paul
            What version of eSignal are you running? If I remember correctly that error was fixed in 7.9
            If using 7.9 are you getting this error while running a syntax check on the script or when you apply the efs to the chart? If the former try loading the efs on a chart. If the latter what symbol/interval?
            Alex

            Comment


            • #7
              Using 7.9 and get error when syntax checking from editor.

              Paul.

              Comment


              • #8
                Paul
                Try loading the efs on a chart and see if you still get the error.
                I think that formatPriceNumber(getMostRecentTrade()) retrieves the information it needs from the chart
                Alex

                Comment


                • #9
                  It works when used on the chart. I am a 4GL programmer (ever heard of SAS software) by trade - so used to checking syntax.

                  Thanks.

                  Paul.

                  Comment


                  • #10
                    GREAT!tnx alex but i want the close of last bar no new close (c-1 in metastock) tnx alredy

                    Comment


                    • #11
                      sante
                      In that case replace every instance of getMostRecentTrade() with close(-1)
                      Alex

                      Comment


                      • #12
                        i do write that in efs editor?

                        Comment


                        • #13
                          sante
                          Yes with the EFS Editor
                          Alex

                          Comment


                          • #14
                            GREAT!!!!!!!!

                            Comment


                            • #15
                              tnx alex and sorry if i have some problems to understand but i'm italian and is more time who i don't speak eanglish
                              tnx all, now i can change a color and what a kind of colore i can use:
                              red, green, black, withe, i think only someone
                              sorry if i brake your ...... but i want to know esignal
                              tnx for support already to!!!
                              GREAT!!!!!!!!!!!

                              Comment

                              Working...
                              X