Announcement

Collapse
No announcement yet.

higher time moving average help

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

  • higher time moving average help

    I am a beginning user of esignal EFS and am asking the following pplease

    What I would like to be able to do is for eg. using a one minute bar chart have a 2 period 5 minute exponential moving average of the close displayed on/over the one minute chart. Instead of it drawing the moving average as a line have it show in a step formation.

    Can this be done with esignal and if so how can I get it done or would there be a file in here that does it.

    I appreciate any help

    thanks

    Tim

  • #2
    Hello Tim,

    Currently this is a complicated process in EFS, but the formula below should do what you need. It is still a work in progress and there are a couple minor issues I still need to work out, but you will probably find this useful as is. FYI, there are some future developments in EFS that will make this type of process much simpler. You'll hear more details about this in a future release.

    Be sure to open the formula and read the notes on the formula parameters. The formula plots two higher time frame intervals by default, but you have options to turn one off through "Edit Studies." The EDIT button in the lower left of the chart is a shortcut to the "Edit Studies" options.

    IntervalMA4.efs

    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
      there are some future developments in EFS that will make this type of process much simpler
      Jason any news on these new devlopments? I am currently running the latest Beta.
      Thanks
      George

      Comment


      • #4
        Jason k is it possible to make the source of the ma in addition to the open and close another option hlc/3


        Thanks

        Comment


        • #5
          Hello silverxx12

          During the initial development of the formula I had started adding other price sources and ran into some snags that required a much greater development effort than I anticipated, so I left it at Open and Close. I will take some time to revisit this option in the next day or two.
          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
            Thanks Jason really appreciate it

            Comment


            • #7
              How do I do this with a study? Explicitly, vStochFast & vStochSlow in the attached file. I would like to place this indicator on a 2 minute chart, but use the values from a 5 minute chart.

              Thanks in advance,
              Greg
              Attached Files

              Comment


              • #8
                I've also attempted to do this with T3Ave.efs:

                if (sPriceSource == "HL/2") {
                vPrice = (high(0, 1, "YM U4,5")+low(0, 1, "YM U4,5"))/2;
                } else if(sPriceSource == "HLC/3") {
                vPrice = (high(0, 1, "YM U4,5")+low(0, 1, "YM U4,5")+close(0, 1, "YM U4,5"))/3;
                } else if(sPriceSource == "OHLC/4") {
                vPrice = (open(0, 1, "YM U4,5")+high(0, 1, "YM U4,5")+low(0, 1, "YM U4,5")+close(0, 1, "YM U4,5"))/4;
                } else {
                vPrice = getValue(sPriceSource, 0, 1, "YM U4,5")
                }

                Though it is working, it is not working correctly. Any suggestions or help?

                Thanks,
                Greg

                Comment


                • #9
                  Hello Greg,

                  The main problem with multiple time frame studies is that there is no simple way to synchronize the data from the higher time frame bars to the lower time frame bars. It can be accomplished, but it's very complicated. We will have simple methods to accomplish this task with the arrival of EFS2, which is still in development. For now, if you have some solid programming experience, it shouldn't be out of reach for you. If not, then this project is one that most likely will require the help of one of our EFS Consultants.

                  Basically, there are 2 methods I would recommend to accomplish multiple time frame studies.

                  1. Use the formula global scope to pass the data between two charts running separate formulas with setGlobalValue(name, value) in the higher time frame chart and getGlobalValue(name) in the other. This is the quick and easy method but it doesn't sync data on the historical bars. This method should only be used to collect the data in real time. At the top of main() in both formulas add if (getCurrentBarIndex() < 0) return; .

                  2. Build the higher time frame bar data based on the bar data in the lower time frame chart. This method is accomplish with a single EFS running on the lower time frame chart. Store this "collected" bar data in array(s) to be used for calculating the indicator values of the higher time frame within the formula code. The key to this method is that the higher time frame interval used must be a multiple of the lower time frame interval. If your lower time frame interval is 5 minutes, use 10, 15, 20, etc. for the higher time frame interval. The IntervalMA4.efs posted earlier in this thread is an example of this method.

                  There is a lot more to method 2 than I've explained in this short paragraph. Use the IntervalMA4.efs as a guide. That code is open source for the community, so feel free to take the formula to a consultant for modification if you desire.

                  silverXX12, I haven't forgotten about your hlc/3 inquiry. Still working on it.
                  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
                    Thanks Jason

                    Comment


                    • #11
                      Jason,

                      Excellent! This is exactly what I wanted & needed to know. Thanks!

                      Greg

                      Comment


                      • #12
                        Hello silverxx12,

                        The multiple time frame MA formula below now has the following price sources, Open, High, Low, Close, HL/2, HLC/3 and OHLC/4.

                        IntervalMA5.efs

                        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
                          Thx Jason

                          Comment


                          • #14
                            Interval MA efs

                            Hi Jason,

                            Your IntervalMA study works great. Would it be possible to include an option for offset for both MAs' in that efs and making it available in the edit box? Also if I want to use the Jurik MA how would I incorporate that into your efs. Thanks in advance.

                            Sesh

                            Comment


                            • #15
                              Hello Sesh,

                              During the original development of the formula I did try to add an offset parameter, but the routine was exponentially complex compared to the current code. Since these types of formulas will be simplified with the release of EFS2 (release date is not set), I'm not going to try to add the offset.

                              We can't incorporate the JurikMA into this code unless the JurikMA had an interval parameter. This would require a new formula. If it's imperative for you to have this developed, you may need to contract one of our EFS Consultants.
                              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

                              Working...
                              X