Announcement

Collapse
No announcement yet.

Point Break efs

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

  • Point Break efs

    For the sake of clarity, I have 2 charts open: a 30sec Point Break chart utilizing the Open and a point break amount of 2, along with a "normal" advanced chart of the same security.
    I would like to have an efs study that would output the equivalent "long/short" (red/green) position of the Point Break chart below or on the "normal" chart to compare with or incorporate into other efs studies...
    Has this been done, or would it be difficult?
    Thanks ahead of time from a new guy...
    Mark

  • #2
    Possible Solution

    I believe you could accomplish this with the use of .. Global Variables.

    In your Break Point chart... you would declare two variables...

    var Direction = 0; // 0 = neutral/ 1=Bullish / 2=Bearish
    var SignalTrigger = 0; // 0=none / 1=new trigger

    Now, within your Break Point EFS Script, you would SET these as global variables...

    // Point Break example
    var Direction = getGlobalVariable("Direction");
    // 0 = neutral/ 1=Bullish / 2=Bearish
    var SignalTrigger = getGlobalVariable("SignalTrigger");
    // 0=none / 1=new trigger



    function main() {
    if (Direction == null) {
    Direction = 0;
    }
    if (SignalTrigger== null) {
    SignalTrigger= 0;
    }


    if (BullishEntrySignal) {
    Direction = 1;
    SignalTrigger = 1;
    }
    if (BearishEntrySignal) {
    Direction = -1;
    SignalTrigger = 1;
    }

    if ((getGlobalVariabl(("SignalTrigger") = 0) && (SignalTrigger == 1)) { // New Trigger
    SetGlobalVariable("Direction",Direction);
    SetGlobalVariable("SignalTrigger",SignalTrigger);
    }
    }

    Now.... In your other script you would write code to retrieve the global variables and process them...

    //-------- Other Script Example --------
    var Direction = getGlobalVariable("Direction");
    // 0 = neutral/ 1=Bullish / 2=Bearish
    var SignalTrigger = getGlobalVariable("SignalTrigger");
    // 0=none / 1=new trigger

    function main() {
    if (Direction == null) {
    Direction = 0;
    }
    if (SignalTrigger== null) {
    SignalTrigger= 0;
    }

    if ((getGlobalVariable("Direction") == 1) && (getGlobalVariable("SignalTrigger") == 1)); { // Process bullish trigger
    drawShapeRelative (..... );
    SignalTrigger = 0;
    }
    if ((getGlobalVariable("Direction") == -1) && (getGlobalVariable("SignalTrigger") == 1)); { // Process Bearish trigger
    drawShapeRelative (..... );
    SignalTrigger = 1;
    }

    // reset signal trigger...
    SetGlobalVariable("SignalTrigger",SignalTrigger);
    }

    You will probably have to add a few extra steps, but this is the general idea...

    Brad
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thanks, Brad
      I've been away on business - I'll give this a try.
      Appreciate your suggestion.
      Mark

      Comment


      • #4
        Re: Point Break efs

        Originally posted by mholstius
        For the sake of clarity, I have 2 charts open: a 30sec Point Break chart ...Mark
        How do you get a 30sec Point Break chart? I've been using 1 minute because I don't see an option for anything less except 1 tick.

        Thanks in advance.

        Kefli

        Comment


        • #5
          Re: Reply to post 'Point Break efs'

          Kefli
          Set the interval of your chart to 30S or 30s.
          This will switch you to "Seconds charts" that are a derivate of Tick charts.
          Alex

          Comment


          • #6
            time interval

            Thanks for your reply, Alex. I feel really stupid, but I can't see how to set the time interval to 30s. I see 1, 3, 5, 10, 13, 15, 30, 60, daily, monthly, tick, weekly. Where do I enter 30s?

            Thanks.
            Kefli

            Comment


            • #7
              Re: Reply to post 'Point Break efs'

              Kefli
              Select the chart you want "Seconds bars" on and then just type 30s (or any
              other number).
              This will open the Symbol dialog box that allows you to change Symbol and
              Interval for that chart.
              FWIW you are not just limited to the intervals you see on your Favorites
              bar.
              Alex

              Comment


              • #8
                interval

                Thanks. I didn't know you could do that. Working fine.

                Kefli

                Comment


                • #9
                  Kefli
                  If you would now like to add "Seconds" intervals to your Favorites bar then you can find the instructions on how to do this at the following link.

                  Explanations for each step can be found in the text on top of the images.
                  Alex

                  Comment

                  Working...
                  X