Announcement

Collapse
No announcement yet.

Combinate 3 Signals...

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

  • Combinate 3 Signals...

    Hello i have a question.... is there a way to combinate the result of three -nonstandart- formulas e.g. with the alertlist i planed a efs file which only gives a signal at the 2.nd up or 2.nd down signal so that 2 of tree indicators have to say up or down...

    please help
    regards erilein

  • #2
    yes, which ones do you want to combine?

    Comment


    • #3
      hm i didnt think about that yet... but i know that it wont be standartstudys... so how do i combinate 3 and more formulas... because when i ever post the exactly formulas here then i dont learn for the future... i need a standartformula... to combinate much efs files.

      thanks and regards erilein

      Comment


      • #4
        Well, for example..

        the attached combines the MA CCI and ADX indicators to colr the bars when they all move a certain way.

        Maybe that will give you some ideas to get started.

        If you really want to learn, write a simple efs with the Wizard, to turn the bars green when rising and red when falling, then add an additional criteria, say only turn the bars green when the ma is rising and the adx is above 30.

        You will begin to see how additonal criteria can be added.
        Attached Files

        Comment


        • #5
          Here is how I do it:

          I "normalize" the indicators (did not find a good solution for Oscilators and MACD):

          ADX: divide by TrendLevel you choose (I use 20 or 25).
          CCI: divide by TrendLevel (I use 100)
          MAs: I use Slopes that I I daily normalize (slope/bar multiplied by the number of bars in a day).
          Stochastic and Stochastich like indicators (that have a given range): Normalize them as follows:
          NormalizedValues = Value/MidPoint where
          MidPoint = (RangeMax-RangeMin)/2
          Stochastich like indicators include: RSI, BollingerBandsPercent, MoneyFlow and others.

          This method will give a comparable range (oscilating around Zero)for all indicators, so we can add, substract them or anything in between.

          Good Luck!
          Mihai
          Mihai Buta

          Comment


          • #6
            hello...
            i thin kthe attached file (3in1) will not work because the formulas i will use are not included in the wizzard (not the formula wizzard and also not the alert wizzard...) so i want to know how i do that in the efseditor
            regards eric

            Comment


            • #7
              erilein

              Instead of using the internal indicators, create your own, then subsitute your indicators for the internal ones.

              For example

              indic1= close()-high();
              indic2=high()-low()
              indic3=indic1/indic2;
              if(indic3>0)
              setPriceBar(color.red);

              Does that give any ideas?

              Comment


              • #8
                erm... but the indicators that i mean are not so simple... there is no way to get them with hig and close...

                i need a way to get 3 function main ... to one function main

                do you know what i mean ?
                regards erilein

                Comment


                • #9
                  Without specific info, it will hard for anybody to help you properly.
                  I try ti guess "what you mean".

                  If I gues correctly, here you have two problems:
                  1. How to combine three functions in one efs, and this is simple.
                  2. How to display them properly.

                  I provided solution for the second problem.
                  For the first problem the solution is to make each (presently) main into a function in the combined main. You can also leave them as they are and call them with callFunction. There are plenty of examples that show how to do this.

                  Good Luck!
                  Mihai Buta

                  Comment


                  • #10
                    e.g. i take 3 dinapoli formulas which arent standart how do i get a signal (1signal) from them...
                    regards erilein

                    Comment


                    • #11
                      Copying the diferent main functions into one is not a problem:
                      a/ copy & paste the parts you want (NO RETURN)
                      b/ create your own return:
                      return new Array(indicator1, indicator2, etc.).

                      The real problem will be to "see" something because the ranges are diferent.
                      To resolve this isuue, look at my first reply.

                      Mihai
                      Mihai Buta

                      Comment


                      • #12
                        Eric
                        If I understood you correctly you want to combine signals from different efs.
                        Using as an example a simplified version of Mihai's suggestion try the following.

                        Take the DiNapoli MACD.efs and assume that the signal is given by the macdema being above the SLine.
                        In that efs substitute Line 94 and onwards with the following and save the efs as MACDtest in the DiNapoli folder

                        if(macdema>SLine){
                        var xyz = 1
                        }else{
                        xyz=0
                        }

                        return xyz;//new Array(macdema, SLine);
                        } else {
                        return;
                        }
                        }

                        Then create another efs with the following code

                        function preMain() {
                        setPriceStudy(false);
                        setStudyTitle("callfunction dinapoli test");


                        }
                        function main() {

                        var x = callFunction("/DiNapoli/MACDtest.efs","main");

                        return x;
                        }

                        You should get the result shown in the bottom pane in the image below which is the same as what the DiNapoli MACDtest.efs returns (middle pane).



                        This is one way of doing what you want.
                        Another way can be found in this thread, but there may be other ways too depending on the efs(s) involved.

                        Alex

                        Comment


                        • #13
                          Yeah alex THATS VERY VERY GOOD!!! nice ... this was exactly what i mean... because when i can import the vars in my formula there wont be problems anymore... i try coding this now... i will report if i get it or not... but i thing this might work

                          regards *the happy* erilein

                          Comment


                          • #14
                            i read the link you post exactly and now i think i will do it with a textdocument like in this discussion... thats a very variable way... because when it works like i think you have got to change only the "event" what is startet through the if(....)event;
                            and so i can code a new efs with a variable i can set. perhabs a=+5 (buy call) a=-5 (buy put) and so i can add very much formulas is this right ?! i only have to change the a in my main calculating efs... when that will work it was a good day for me

                            regards erilein

                            Comment


                            • #15
                              well i tried the method you postet alex... but i dont know i get errors ... maybe the formulas i want to use are to complicated for me... but i want to learn coding ... thats for sure

                              tomorrow i will test the method with reading and wrinting in text documents i hope i will get it.

                              perhabs you have got some tips for me (how to load the variables ( i think there i have got my problems))

                              regards erilein

                              Comment

                              Working...
                              X