Announcement

Collapse
No announcement yet.

Floating Vertical Line

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

  • Floating Vertical Line

    Anybody know if there's a study for a "floating" vertical line? This would always be visible and would move with each bar. The action would be similar to using the vertical toolbar and manually dragging it.

    Would appreciate any feedback, thanks.

    Steve

  • #2
    Hello Steve,

    Are you asking for a vertical line that stays on a fixed bar index, say bar -10, so that every time a new bar starts the vertical bar stays at -10?
    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
      here is a link to a vertical line application, but it is for fixed lines at a specific bar link

      Comment


      • #4
        Jason and Steve, thanks for replying. No, I don't want a fixed vertical line at a specific bar/time. Plz look at my attachment and imagine the vertical line (marked with yellow X) automatically moving to the right and over the next bar when it's completed. I have a visual tracking problem so it's difficult for me to tell which volume bar belongs to which price bar. This would help me a great deal but I don't know if it's possible. I've search EFS Studies and File Sharing but could not locate an appropriate study.

        Plz let me know if this can be done. Perhaps you know of an existing vertical line study which is close enough to be recoded for what I want to do?

        I appreciate any help you can give me on this. Hope ya both have a great weekend.

        Steve M.

        P.S. My log in only lasts for about 5 minutes if not navigating. Tech support doesn't know the fix.....any ideas??
        Attached Files

        Comment


        • #5
          Hello Steve,

          Try this.

          PHP Code:
          function main() {
              if (
          getBarState() == BARSTATE_ALLBARS) {
                  
          drawLineAbsolute(000, (1*Infinity), PS_SOLID1Color.grey"vert");
              }
              
              return;


          As for the log in problem, it sounds like it could have something to do with your security settings in your browser. Your log in and session state is tracked with cookies I believe, so if your browser security settings are too high it might be preventing the cookie from getting written or something along those lines. Every time you visit a new page in the forums the browser needs to check some data in a cookie. If it doesn't see what it needs it probably thinks you're not logged in.
          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


          • #6
            HA/ALERTS

            Hi Jason, I've seen several postings from you re: HA and apparently you've researched this a bit. I've been trying the attached "heikinashi3" and it's giving me some very accurate signals for entry/exit with quick daytrades. Could you plz show me how to write the following conditions for audio/visual alerts:

            *if previous candlestick is red (haclose < than haopen) &&
            *if current candlestick is green (haclose > haopen) &&
            *if current candlestick is >=MA; then audio/visual alerts.

            I'm using another study called "builtinbb(smart1-alerts) which already has the a/v alert conditions I want. I could use these as a code model but need your help to determine exactly where to locate them on HA3. If the modifcations for HA3 work out I realize I may not be able to run the bb study.

            2 more attachments will follow: the bb study and a snapshot showing what I'm trying to do. Thanks a bunch and hope ya had a great holiday!

            Steve
            Attached Files

            Comment


            • #7
              BB Study

              Here's "builtinbb(smart1-alerts)".
              Attached Files

              Comment


              • #8
                Snapshot

                Here's snap of "heikinashi3" and how intend to use it. This can be used for stocks moving up or down.
                Attached Files

                Comment


                • #9
                  Hello Steve,

                  Here's what you need to do for the HA3.

                  1. Create a global variable called retArray1 with a length of 4.

                  var retArray1 = new Array(4);

                  2. At the end of main and before the return statement, set retArray1 equal to retArray.

                  retArray1 = retArray;

                  3. After that line and before the return statement add the following.

                  if (retArray1[3] < retArray1[2] && retArray[3] > retArray[2] && retArray[1] <= aMovAvg[0]) {
                  // alert code here
                  }


                  That's the basics of what you need to do. However, you have a couple other decisions to make. In addition to the alert code, do you want the alerts to trigger on every trade during the interval, only the first time etc. Currently, the example I gave you will trigger on every trade where the condition evaluates to true. If you only want the alert to occur once per bar, check out the AlertOncePerBar.efs help example. It will show you how to handle that scenario.
                  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


                  • #10
                    HA

                    Hi Jason, high/low alerts working with all new conditions except syntax error when I add the last condition shown on lines 274 and 281 (greyed out). It asks for a ; before 275 and 282 but didn't work when I added it. Here's what I'm trying to do with these last conditions: 274 is if the current high <= the current moving avg, and for 275 the current low <= the current moving avg.

                    Note: I've received this semicolon syntax error for many of my codes. Does this always mean the same thing and if so is there a common fix?

                    I've attached heikinashi3, and thanks again for your help.

                    Steve
                    Attached Files

                    Comment


                    • #11
                      CORRECTION

                      On line 274 I meant current high >= current moving avg.

                      Comment


                      • #12
                        Hello Steve,

                        At the end of line 274 you have an extra close parenth and open brace (i.e. ) { ) that shouldn't be there since your conditional if statement continues on the next line.

                        This is the line with the syntax error.

                        PHP Code:
                             if (retArray1[3] < retArray1[2] && retArray[3] > retArray[2] && retArray[0] >= aMovAvg[0]) {
                                 
                        vFlag1 ==0){ 
                        Try this,

                        PHP Code:
                             if (retArray1[3] < retArray1[2] && retArray[3] > retArray[2] && retArray[0] >= aMovAvg[0] &&  vFlag1 ==0){ 
                        or this,

                        PHP Code:
                             if (retArray1[3] < retArray1[2] && retArray[3] > retArray[2] && retArray[0] >= aMovAvg[0]) {
                                 
                        //vFlag1 ==0){ 
                        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


                        • #13
                          Jason, your first suggestion was accepted. However, I gave you BAD INFO on previous thread.....the alerts were actually NOT working on heikinashi3. I had not removed another study which was triggering the alerts. The alerts also do not work with this new change I just made. The hi/lo alert conditions are from 272-285 but could there be a problem somewhere else?

                          Please advise and thanks again for your help and patience.

                          Steve
                          Attached Files

                          Comment


                          • #14
                            Hello Steve,

                            I think the problem is on line 273. You are setting retArray1 equal to retArray on every tick. retArray1 is used to store the return values from the previous bar so this should only be done at NEWBAR before the values of retArray are updated for the new bar. Try this,

                            if (getBarState() == BARSTATE_NEWBAR) retArray1 = retArray;

                            If that doesn't solve the problem then you need to add a debugPrintln() statement before line 274 and check the values of the arrays and variables you are referencing in your if statement. That should point out what part of the if statement is preventing it from evaluating to true.
                            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


                            • #15
                              Jason, that didn't work so I tried debugPrintln() but defined it wrong. How would you suggest writing the definition? Also, are you certain I place it BEFORE line 273? Examples I looked at show the debug on a line AFTER the conditions. Plz explain, thanks.

                              Steve

                              Comment

                              Working...
                              X