Announcement

Collapse
No announcement yet.

Can lines drawn with an efs remain on the chart after the efs is removed?

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

  • Can lines drawn with an efs remain on the chart after the efs is removed?

    Hello

    I am using drawLineRelative to plot a number of things, and most of the time, the default behaviour of the lines being automatically deleted whenever the efs is re-loaded, removed, or the time period is changed, is fine.

    However, there is one particular instance where I want lines drawn by my efs to remain on the chart, even after the time period is changed, the efs is re-loaded, or even removed.

    Is there a way to achieve this?

    Thanks in anticipation.

  • #2
    Hello trubshac,

    EFS does not currently have the ability to accomplish this. Please feel free to submit a request for this feature 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
      Thanks for your speedy response.

      Is there anyway that I could write my own drawing tool, that is linked to a button within esignal. I would really like to be able to write something that operates just like the fibonacci retracement tool, where you click on the tool, click on the chart to identify some reference points, then do some computations, and mark lines on the chart that will remain there until manually removed.

      Comment


      • #4
        Hello trubshac,

        Yes, you could do this. Your EFS would draw some button(s) on the chart that would set some global flags when clicked to turn on the logic for your EFS drawing tool. Then you would use the Mouse Functions to gather the bar index and price data for the calculations and send the resulting x/y pairs based on those calculations to draw the lines using the Drawing Functions.
        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


        • #5
          ongoing question?

          i think i have the same question / problem.
          When i draw lines on a chart using an EFS by doubleclcking on a point, i can get the values, and draw some text to go with the line. But if i put another symbol in the same chart, and then go back to the first chart the EFS drawn lines have dissapeared, yet manually drawn lins using the drawing tool are in the same place.
          Is this normal, or is there a way to fix this problem that i have?
          thanks.

          Comment


          • #6
            Hello Dug,

            This is normal behavior for EFS. Lines drawn by an EFS are removed by default when the formula is reloaded or removed. Changing symbols, forces a relaod of the formula to process the data on the new symbol. EFS does not have any built-in methods to force the lines to persist between the reload/remove events. You could develop your own method using the File Object to write the information for the lines to a text file. When the formula is loaded it will look for a specific file name based on the symbol of the chart to retrieve the info for the lines and redraw them once the formula completes the loading process. For the x-coordinate values of the lines you will need to store the bar time stamps and then loop back through the chart to find the corresponding bar index for the drawing functions. You could use rawtime() for the bar times.
            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


            • #7
              thanks.
              given this. if i wanted to maintain lines, or buttons drawn manually using an EFS, i need to write the x and y cordinates for each symbol to a text file. so if i wanted to do so over 200 symbols i would have 200 text files, and the formula reloads the old text file for the particular symbol, until i overwrite that text file by moving the lines drawn by the EFS.
              it would be easier if i could just get the current bar / latest bar value of any lines drawn on the chart using the normal drawing tools. is this not possible? maybe i should make this a suggestion to e-signal.
              thanks.

              Comment


              • #8
                Dug,

                This efs contains the steps required to do what you want for a single trend line. There are specific functions in the efs to save and reload the line object along with the associated rules to import the line into your redrawn or new chart.

                Your request is not trivial, but if you would like the feature, you should submit a feature request.

                I hope this helps.

                Comment


                • #9
                  thanks Steve. it does help...but at this stage in my programming knowledge my head almost exploded in confusion. the good thing is i'm learning all the time

                  i have worked out roughly how to do what i want, and using your trend alerts should help tweak it, but i keep hitting a snag....its probably an easy fix but i'm stuck.
                  the process of the EFs is...
                  i dbleclick three times and draw three buttons at different spots on the chart. then if i'm happy i click on one of the buttons and this writes the info to the file.....everything fine and dandy
                  the problem ocurs when reloading.
                  in the <function main >i have said that i want to redraw the saved info, not as a button but as a line....even though i get the same error in both cases.
                  the error says that the 2nd parameter (or var y) is invalid
                  the debugprint() of line 44 works, so i know i have reloaded the right numbers BUT in the line 46 of the addlinetool(), unless i actually put in a number here it will not redraw.

                  What am i missing?
                  Attached Files
                  Last edited by Dug; 05-23-2006, 01:47 AM.

                  Comment


                  • #10
                    Dug,

                    Just a quick review, I belive your error is due to the 2nd parameter (or var y) is a string. When you read from a file, every parameter is read in as a string. To convert to a number, multiply by one, i.e. y*1.

                    To check for a string, try the typeof() command (a quick reference)

                    Comment


                    • #11
                      Thanks.
                      Starting to pick up hints and tips makes things easier.
                      i have tweaked it a little and have re-sent the EFS. i figure somebody else might be able to use it. it is probably pretty messily written, but it works.
                      At least now i have what i want (finally!) a system that allows me to export my own manually placed points to excel.(via a text file).
                      now back to trading.
                      Attached Files

                      Comment


                      • #12
                        Hi Dug,

                        It was my pleasure, I am glad you were able to pick up on this so quickly.

                        Comment

                        Working...
                        X