Announcement

Collapse
No announcement yet.

Esignal formula help....

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

  • Esignal formula help....

    Can someone help me export my simple metastock formula to esignal....

    Paint the bars blue if-

    Mov(C,20,E)>Mov(C,30,E) AND
    Mov(C,10,S)>Mov(C,20,E)
    AND Mov(C,30,E)< Mov(C,10,S)

    Paint the bars red if-

    Mov(C,20,E)<Mov(C,30,E) AND
    Mov(C,10,S)<Mov(C,20,E)
    AND Mov(C,30,E)> Mov(C,10,S)

    Paint the bars black if-

    neither of the above.



    --MIKE

  • #2
    //{{EFSWizard_Description
    //
    // This formula was generated by the Alert Wizard
    //
    //}}EFSWizard_Description 7532


    //{{EFSWizard_Declarations

    var vSMA10 = new MAStudy(10, 0, "Close", MAStudy.SIMPLE);
    var vEMA20 = new MAStudy(20, 0, "Close", MAStudy.EXPONENTIAL);
    var vEMA30 = new MAStudy(30, 0, "Close", MAStudy.EXPONENTIAL);
    var vLastAlert = -1;

    //}}EFSWizard_Declarations 25986


    function preMain() {
    /**
    * This function is called only once, before any of the bars are loaded.
    * Place any study or EFS configuration commands here.
    */
    //{{EFSWizard_PreMain
    setPriceStudy(true);
    setStudyTitle("MikeLikesIt");
    //}}EFSWizard_PreMain 6663

    }

    function main() {
    /**
    * The main() function is called once per bar on all previous bars, once per
    * each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
    * in your preMain(), it is also called on every tick.
    */

    //{{EFSWizard_Expressions
    //{{EFSWizard_Expression_1
    if (
    vEMA20.getValue(MAStudy.MA) > vEMA30.getValue(MAStudy.MA) &&
    vSMA10.getValue(MAStudy.MA) > vEMA20.getValue(MAStudy.MA) &&
    vEMA30.getValue(MAStudy.MA) < vSMA10.getValue(MAStudy.MA)
    ) onAction1()
    //}}EFSWizard_Expression_1 29069

    //{{EFSWizard_Expression_2
    else if (
    vEMA20.getValue(MAStudy.MA) < vEMA30.getValue(MAStudy.MA) &&
    vSMA10.getValue(MAStudy.MA) < vEMA20.getValue(MAStudy.MA) &&
    vEMA30.getValue(MAStudy.MA) > vSMA10.getValue(MAStudy.MA)
    ) onAction2();
    //}}EFSWizard_Expression_2 29460

    //}}EFSWizard_Expressions 83391


    //{{EFSWizard_Return
    return null;
    //}}EFSWizard_Return 2256

    }

    function postMain() {
    /**
    * The postMain() function is called only once, when the EFS is no longer used for
    * the current symbol (ie, symbol change, chart closing, or application shutdown).
    */
    }

    //{{EFSWizard_Actions
    //{{EFSWizard_Action_1
    function onAction1() {
    setPriceBarColor(Color.RGB(0,0,255));
    vLastAlert = 1;
    }
    //}}EFSWizard_Action_1 10761

    //{{EFSWizard_Action_2
    function onAction2() {
    setPriceBarColor(Color.RGB(255,0,0));
    vLastAlert = 2;
    }
    //}}EFSWizard_Action_2 10981

    //}}EFSWizard_Actions 42453

    Comment


    • #3
      Mike
      I think the attached does what you want.
      FWIW this was created using the Formula Wizard
      Alex
      Attached Files

      Comment


      • #4
        Dang, the Loomis is faster than a bullet!!!
        Alex

        Comment


        • #5
          and too think I was afraid you were going to get there first

          Comment


          • #6
            The EFS doesnt work

            Comment


            • #7
              Mike
              I tried both mine and David's and they both work (see attached). Now they may be both wrong but that is another story...hehehehe
              Alex
              Attached Files

              Comment


              • #8
                How did you run the EFS in esignal... what exactly do I have to do?

                Comment


                • #9
                  Re: Reply to post 'Esignal formula help....'

                  You can either:

                  1. Open the Editor (Tools->Editor) and Copy and Paste David's formula then
                  save it to the C:\program files\eSignal\formulas\(anyfolder) OR
                  2. Download the attachment I sent and save it in the same path above
                  Then
                  A, Right click chart and from the context menu select Formulas
                  B. Go to the folder you saved the efs in and select MA Mike (or whatever name you saved David's formula)
                  Hope this helps

                  Alex
                  Last edited by ACM; 01-31-2003, 12:18 PM.

                  Comment


                  • #10
                    THanks... got it to work...

                    Where can i get this formula wizard..

                    Comment


                    • #11
                      Re: Reply to post 'Esignal formula help....'

                      I believe you need to have version 7.2 and you will find it under Tools in
                      the Main Menu
                      Alex

                      Comment


                      • #12
                        Re: Reply to post 'Esignal formula help....'

                        I think you need version 7.2. Click on tools and select formula wizard.
                        ----- Original Message -----
                        From: <[email protected]>
                        To: <[email protected]>
                        Sent: Friday, January 31, 2003 2:19 PM
                        Subject: Reply to post 'Esignal formula help....'


                        > Hello rhbishop,
                        >
                        > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        >

                        Comment


                        • #13
                          THere seems to be a one bar delay sometimes.... How to do you eliminate this...

                          FOr example goto NEWP 1/28/03... the EFS makes the daily bar black but its supposed to be red

                          Comment


                          • #14
                            Re: Reply to post 'Esignal formula help....'

                            Mike

                            Try this. Go to the Formula Editor and open the formula Mike MA (if that is
                            the one you are using) and change these lines

                            var vSMA10 = new MAStudy(10, 0, "Close", MAStudy.SIMPLE);
                            var vEMA20 = new MAStudy(20, 0, "Close", MAStudy.EXPONENTIAL);
                            var vEMA30 = new MAStudy(30, 0, "Close", MAStudy.EXPONENTIAL);

                            to this

                            var vSMA10 = new MAStudy(10, -1, "Close", MAStudy.SIMPLE);
                            var vEMA20 = new MAStudy(20, -1, "Close", MAStudy.EXPONENTIAL);
                            var vEMA30 = new MAStudy(30, -1, "Close", MAStudy.EXPONENTIAL);

                            Then Save (or Save As) the formula

                            Does this work?

                            Alex
                            Last edited by ACM; 02-01-2003, 07:17 AM.

                            Comment

                            Working...
                            X