Announcement

Collapse
No announcement yet.

merged studies

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

  • merged studies

    Hello, just a quick question.

    I am running a 135 tick chart of ES Z3 and am trying to merge two moving average studies onto the same panel.

    I can get them on the same panel, but I would like the zero line to stay put relative to each other (i.e. when one scale expands, I want the other to move (expand) relative to it)

    Is there anyway to do this?

    Thanks in advance
    Daniel

  • #2
    I'm unsure how a Moving Average would be placed in a non-price study area. Are you using an EFS to do this? If so, then it would be easier to incorporate the two lines into the same EFS then it would be to get them scaled together via merging them.

    Perhaps, I'm misunderstanding. If so, could you clarify?
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      I am actually running two basicOSC indicators
      1. Long term OSC, .efs modified to plot as historgram and turn green when positive, red when negative

      2. Short term OSC, .efs modified to plot as line, same color variations as above

      Both of these were modified from basicOSC.efs.

      Problems with a two efs solution:
      1. When merged, the zero lines of the two OSC's move relative to each other as each scales (even if one is set to no scale)

      2. When both are set to "no scale" in edit studies, the studies get cut off as they go up and down (go out of the study pane).

      Problems with a single efs solution:
      I can't seem to figure out how to plot both indicators in a single .efs (or how to individually control thier colors). New to javascript, but learning.

      Thanks for your help
      Daniel Parker

      Comment


      • #4
        Hello Daniel,

        The key is your return statement. It would look something like return new Array(osc1, osc2);.

        If you need further assistance, post your code here.
        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
          So there is no way to "lock" the individual scales together?

          Thanks for your help, I will try to program this tonight when I get home.

          Daniel

          Comment


          • #6
            If you want to have the two indicators over the same range, this can be done, but you have to plot the outer bounds you want the indicators to oscillate in.

            On a few studies I have returned

            return new Array(ocs1, osc2, +100, -100)

            and they now oscillate between +100 and -100 rather than between osc1 and osc2. Of course, osc1 and osc2 run between -100 and +100.

            If one of them exceeds the outer range, the application will adjust the scalling.

            Comment


            • #7
              Daniel
              Here is the basicOsc.efs doubled up.
              Alex
              Attached Files

              Comment


              • #8
                Daniel
                Following up on the previous message here is what you would then do to paint each plot individually.
                For example if you want to paint the histogram of the first oscillator when above 0

                if(vOsc.getValue(OscStudy.OSC)>0)
                setBarFgColor(Color.green,0);

                and to paint the line of the second oscillator when below 0

                if(vOsc2.getValue(OscStudy.OSC)<0)
                setBarFgColor(Color.magenta,1);

                Hope this helps
                Alex

                Comment


                • #9
                  Helps greatly, thanks to all for your support

                  Cheers
                  Daniel

                  Comment

                  Working...
                  X