Announcement

Collapse
No announcement yet.

NEWS...I am releasing my "Favourite Code"...for Code Conversion !!!

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

  • #46
    Does anyone know how to transfer an array btw two charts using global variables, are there any examples on this forum, I have searched and there are no examples. The efs code help does not show how this can be done either ...

    Please help ....

    Comment


    • #47
      Digs,
      I don't have time to deal with your global variables at the moment.
      Nor do I think that it is necessary. This is not the type of study
      that needs to update each tick. (And remember, I wrote this after
      market hours, so I have no idea what will happen during real time, but I expect it will perform just fine.)

      First, I suggest that you decide just how much history you need to see during trading hours and create a new Time Templet. I have several time templets for different purposes:
      For programming, I never look at more than 2 days data at a time...you just don't need it under most circumstances, and a short programming templet saves you when you get into bug filled calculations.

      I have time templets for 1, 2, 3, 4, or 5 days using standard US market trading hours (9:30 to 16:15 New York time for ES futures).

      I also have templets that cover the entire 24 hour period for when I want to see what is happening overnight, and a "dynamic" templet (which comes standard with eSignal) which will pull in as many bars as necessary as you scroll the chart.

      To create a templet that will look at 3 days of bars (remember, weekends count as days, so you may think a 1 or 2 day templet isn't "working" if you use it on the weekend):
      1- Click in a chart to activate it
      2- Click Chart Options, Time Templets, Edit
      3- Click New Templet, give it a name, and click OK
      4- Click in the #Days box, and enter 3
      5- Click in the Start Time box and enter time in 24 hour clock numbers (If you need help with your time settings, call tech support)
      6- Click in the End Time box and enter time in 24 hour clock numbers
      7- Click Update/Add
      8- Click Close

      You are now back at your chart. Click Chart Options,TimeTemplets, and select the one you just created.

      I just loaded the first study into 5 days of 5 minute bars, and it loaded in a matter of seconds. That is fast enough for this.

      Best of luck, rmclean

      Comment


      • #48
        Thx for help, I think globlal variables are required here to ensure speed of indicator calculation.

        Thx heaps

        Comment


        • #49
          Digs,
          No they are not.

          You may misunderstand what is taking much of the time in the first chart. It is simply that the AlmostDantonStop has to be calculated for each bar in the chart. This will take the same amount of time no matter if you use global variables or not. It is not material.

          Next, realize that these calculations and the writting of all that data to a file only happens once...when the chart is first loaded. Once that is done, the calculations and the writting to file only take place with each new bar...once every 15 minutes in this case.
          In fact, if you wanted to, you could (possibly should) include a line in the second efs preMain() to have it also only calculate on close.

          However, carry on with your explorations into global variables. You will learn a lot about programming efs and that is all good.

          Best, rmclean

          Comment


          • #50
            Thanks rmclean, I guess I will try both approaches and see which one works best.

            Comment


            • #51
              This link confirms that Global Variables is NOT the way to go, the file in/out is the best way.

              Wait and see...

              Comment


              • #52
                Digs,
                I tried to follow that link and it blocks me from seeing it. Don't know why.

                I realize that the file i/o reading efs I posted doesn't perform as expected in real time. I was going to debug it, when I decided to look at Global Variables.

                There is no overwhelming problem that I can see. I have written the two efs studies, and I need to run them in real time to check them out.

                If you still want to look at that avenue, let me know and I will post my results here when I get the finished product.

                Bob

                Comment


                • #53
                  Digs, and all who downloaded my earlier File IO efs,

                  I am posting a debugged version of both of the studies. The small timeframe chart did not update properly in real time.
                  It was a matter of simply syncronizing the two efs rawtimes, so there are minor changes to both studies and it is necessary to download both new ones.

                  Here is the first study. Run this on the large time frame chart first.

                  Bob
                  Attached Files

                  Comment


                  • #54
                    Digs and all who etc, etc..

                    Here is the second File IO efs.

                    Run it on the second smaller timeframe chart.

                    Bob
                    Attached Files

                    Comment


                    • #55
                      Digs and all,
                      I should have included this in the notes at the top of the efs.

                      NOTE: Because this stop is calculated on the close of the bar, and the other efs is plotting the existing stop
                      on every tick, it will appear that some of the interim bars on the small time frame chart have the wrong stop.
                      This is not the case. This larger time frame chart never plots a stop line directly above / below the currently
                      building bar. Keep that in mind as you compare the stop lines on the two charts backward in time.
                      I agree that it is somewhat disconcerting when looking at past bars, but at the moment, this is how I
                      understand the mechanics of this stop.
                      It is not a problem when looking at the two charts in real time, because it is obvious what is happening.

                      Bob

                      Comment


                      • #56
                        Excellent work,

                        My settings
                        Chart : 5 Min
                        Price : Close
                        Period : 1
                        Ratio : 0.38
                        Attached Files

                        Comment


                        • #57
                          rmclean, Please post you thoughts and adjustments after you run it realtime, thx.
                          Attached Files

                          Comment


                          • #58
                            rmclean,

                            I wish to have the option to have the larger time frame ( the setting to file efs) stop be able to show or not show stop, this gives better screen management of my indicators.

                            I inputted a "Showplot" function with and on/off switch but it does seam to work when show plot if off, there is no data written to the file. Any ideas

                            thx
                            Attached Files

                            Comment


                            • #59
                              Digs,
                              Here it is, the option to plot or not.

                              I didn't have time to look at your study, but you can look at what I did and compare it by yourself.

                              This version has the option to plot the stop values set as the default. Once it loads for the first time, you can go to Edit Studies and select No for the Show Plot variable.

                              It has not been tested in Real Time, of course, because today is Saturday, but I am sure it will work fine.

                              I haven't renamed it, but if you download from this link you should get the updated version...I think.

                              Bob
                              Attached Files

                              Comment


                              • #60
                                rmClean, your comments

                                ...."Because this stop is calculated on the close of the bar, and the other efs is plotting the existing stop
                                on every tick, it will appear that some of the interim bars on the small time frame chart have the wrong stop.".....

                                This has left the smaller time frame stop with a lagging effect.

                                Maybe this is a possible fix...

                                Say the longtime chart is 5 min, and current bar on close calculation is for 1030 am, (via the "vBigBarTime" variable), then why not substract 5 min from the 1030, so the posting to the file will be 1025 am for the current calculation at 1030 am.

                                This will require the user to load in manually the chart minute time form, unless you can get an efs function to tell you to the chart minute denominator.

                                What do you think...

                                Comment

                                Working...
                                X