Announcement

Collapse
No announcement yet.

Prior version of esignal

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

  • Prior version of esignal

    I just upgraded to the newest version of egignal and now I am having difficulty with efs studies which worked fine on the prior version. Is there a way to reload a prior version while I figure out the problem?

    Alan

  • #2
    Re: Prior version of esignal

    Alan
    Which prior version are you looking for?
    Alex


    Originally posted by Alan2004
    I just upgraded to the newest version of egignal and now I am having difficulty with efs studies which worked fine on the prior version. Is there a way to reload a prior version while I figure out the problem?

    Alan

    Comment


    • #3
      I do not have a record of the number but I know it was from last fall.

      Alan

      Comment


      • #4
        Alan
        You can find version 10.2 here For versions prior to that see this article in the eSignal KnowledgeBase
        Alex


        Originally posted by Alan2004
        I do not have a record of the number but I know it was from last fall.

        Alan

        Comment


        • #5
          I am having similar issues where efs studies that work fine in 10.2 no longer work properly in the latest version.

          Comment


          • #6
            version

            I have isolated the problem to a 1 minute calculation on a 50T chart. Has the programing changed in the new release?

            Best Regards,

            Alan

            Comment


            • #7
              The followinf efs works on version10.2 (last fall) and does not work on the current version. It straight lines the results and does not uodate. I would appreciate your comments on how to get this operational.

              Best Regards,

              Alan

              var MA1 = null;
              var MA2 = null;
              var aa1 = null;
              var aa11 = null;

              function preMain() {

              setPriceStudy(false);
              setStudyTitle(" Logic 96mod986test1");
              setCursorLabelName("MA1", 0);
              setDefaultBarStyle(PS_SOLID, 0);
              setDefaultBarStyle(PS_SOLID, 1);
              setDefaultBarStyle(PS_SOLID, 2);
              setDefaultBarFgColor(Color.black, 0);
              setDefaultBarFgColor(Color.black, 1);
              setDefaultBarFgColor(Color.black, 2);
              setDefaultBarThickness(1, 0);
              setDefaultBarThickness(1, 1);
              setDefaultBarThickness(1, 2);
              setPlotType(PLOTTYPE_LINE, 0);
              setPlotType(PLOTTYPE_LINE, 1);
              setPlotType(PLOTTYPE_LINE, 2);

              Symbol1 = getSymbol();
              Interval1 = "1";
              }

              function main() {

              pp = 0;

              var vSymbol1 = Symbol1+","+Interval1;

              var MA1 = efsInternal("myFunction1",sym(vSymbol1));
              var MA2 = efsInternal("myFunction2",sym(vSymbol1));
              var aa1 = efsInternal("myFunction3",sym(vSymbol1));
              var aa11 = efsInternal("myFunction4",sym(vSymbol1));

              if(MA1 >= MA2) {
              setBarThickness(3,0);
              setBarFgColor(Color.blue,0);
              }

              if(MA2 >= MA1) {
              setBarThickness(1,0);
              setBarFgColor(Color.black,0);
              aa1 = 0;
              }

              if(MA2 >= MA1) {
              setBarThickness(3,1);
              setBarFgColor(Color.blue,1);
              }

              if(MA1 >= MA2) {
              setBarThickness(1,1);
              setBarFgColor(Color.black,1);
              aa11 = 0;
              }

              return new Array (aa1, aa11, pp);
              }

              function myFunction1(){
              var MA1 = sma(7,close())
              return MA1
              }

              function myFunction2(){
              var MA2 = sma(25,close())
              return MA2
              }

              function myFunction3(){
              var MA1 = sma(7,close())
              var MA3 = sma(25,close())

              if(MA1 >= MA2) {
              aa1 = 4;
              }

              if(MA2 >= MA1) {
              aa1 = 0;
              }

              return aa1
              }

              function myFunction4(){
              var MA2 = sma(7,close())
              var MA3 = sma(25,close())

              if(MA2 >= MA1) {
              aa11 = -4;
              }

              if(MA1 >= MA2) {
              aa11 = -4;
              }

              return aa11
              }

              Comment


              • #8
                Hi Alan,

                Thanks for posting your code Alan, it sure helps to pinpoint the issues and quickly resolve things. Having said that, there are some significant issues with it. All I can think is perhaps things worked because of problems with the previous version of eSignal in that it allowed the errors to go by undetected. There seems to be significant problems with variable scope therein as well.

                The issues as I see it are that you are applying conditionals to series (will not work), but then they seem to all be the same conditionals. Then inside the conditionals, you are setting some of the other series to zero. This results in you returning entire series when the conditional comparing the two other series is not met, then returning a numerical value when it is.

                Anyways, I recoded the code you posted to work based on my enterpretation of what you were trying to accomplish with the exception of the conditionals all being identical within 'main' and there being a problem with the conditionals in the functions. (FWIW, re-declaring series objects every tick can lead to significant inefficiencies, something I did not address in your functions.) While I did not verify the functionality, I believe it should work when you get the conditionals straightened out. Hopefully you will find what I did helpful.

                Since you posted your code and not just a non-working snippet, I'll be more than happy to continue and help you get this efs running like you want and optimized as well.

                Take care, thanks again for posting your code!

                PHP Code:
                var MA1 null;
                var 
                MA2 null;
                var 
                aa1 null;
                var 
                aa11 null;
                var 
                sMA1,sMA2,saa1,saa11,paa1,paa11,pp,bInit// added

                function preMain() {

                 
                setPriceStudy(false);
                 
                setStudyTitle(" Logic 96mod986test1");
                 
                setCursorLabelName("MA1"0);
                 
                setDefaultBarStyle(PS_SOLID0);
                 
                setDefaultBarStyle(PS_SOLID1);
                 
                setDefaultBarStyle(PS_SOLID2); 
                 
                setDefaultBarFgColor(Color.black0);
                 
                setDefaultBarFgColor(Color.black1);
                 
                setDefaultBarFgColor(Color.black2); 
                 
                setDefaultBarThickness(10);
                 
                setDefaultBarThickness(11);
                 
                setDefaultBarThickness(12);
                 
                setPlotType(PLOTTYPE_LINE0);
                 
                setPlotType(PLOTTYPE_LINE1);
                 
                setPlotType(PLOTTYPE_LINE2);

                 
                //~ Symbol1 = getSymbol(); //NOT HERE
                 //~ Interval1 = "1";
                }

                paa1=null,paa11=null,pp=null// added

                function main() {

                 
                pp 0;
                 if(!
                bInit){ // added this section and changed content
                  
                var Symbol1 getSymbol();
                  var 
                Interval1 "1";
                  var 
                vSymbol1 Symbol1+","+Interval1;// the variables u defined in pre-Main are not visible here

                  
                sMA1 efsInternal("myFunction1",sym(vSymbol1));
                  
                sMA2 efsInternal("myFunction2",sym(vSymbol1));
                  
                saa1 efsInternal("myFunction3",sym(vSymbol1));
                  
                saa11 efsInternal("myFunction4",sym(vSymbol1));
                  
                MA1=sMA1.getSeries();
                  
                MA2=sMA2.getSeries();
                  
                aa1=saa1.getSeries();
                  
                aa11=saa11.getSeries();
                  
                bInit=true;
                 }
                 if(
                MA1.getValue(0) >= MA2.getValue(0)) { //same conditional as below, why??
                  
                setBarThickness(3,0);
                  
                setBarFgColor(Color.blue,0);
                 }

                 if(
                MA2.getValue(0) >= MA1.getValue(0)) {
                  
                setBarThickness(1,0);
                  
                setBarFgColor(Color.black,0);
                  
                paa1 0;
                 }
                 else{
                  
                paa1=aa1.getValue(0);
                 }    

                 if(
                MA2.getValue(0) >= MA1.getValue(0)) {
                  
                setBarThickness(3,1);
                  
                setBarFgColor(Color.blue,1);
                 } 

                 if(
                MA1.getValue(0) >= MA2.getValue(0)) {
                  
                setBarThickness(1,1);
                  
                setBarFgColor(Color.black,1);
                  
                paa11 0;
                 }
                 else{
                  
                paa11=aa11.getValue(0);
                 }    
                 return new Array (
                paa1paa11pp); 
                }

                function 
                myFunction1(){
                 var 
                MA1 sma(7,close())
                 return 
                MA1
                }

                function 
                myFunction2(){
                 var 
                MA2 sma(25,close())
                 return 
                MA2
                }

                function 
                myFunction3(){
                 var 
                MA1 sma(7,close())
                 var 
                MA3 sma(25,close())
                 var 
                aa1=0// local variable added
                  
                 
                if(MA1.getValue(0) >= MA3.getValue(0)) {
                  
                aa1 4;
                 }
                 else if(
                MA3.getValue(0) >= MA1.getValue(0)) {
                  
                aa1 0;
                 }
                return 
                aa1
                }

                function 
                myFunction4(){
                 var 
                MA2 sma(7,close())
                 var 
                MA3 sma(25,close())
                 var 
                aa11=0// local variable added
                  
                 
                if(MA2.getValue(0) >= MA3.getValue(0)) {
                  
                aa11 = -4;
                 } 
                 else if(
                MA3.getValue(0) >= MA2.getValue(0)) {
                  
                aa11 = -4;
                 } 
                 return 
                aa11

                Comment


                • #9
                  Hi Alan, Steve,

                  Since Iv'e also had trouble with ver 10.3 vs ver 10.2, I tried to recode the script using some of Steve's suggestions. I tested it on both versions and it now plots the same as the original does on ver 10.2.

                  Steve knows a lot more that I. Just thought I'd post what I did in case it helps.

                  Wayne

                  PHP Code:
                  debugClear();
                  var 
                  bInit false;

                  function 
                  preMain() {

                  setPriceStudy(false);
                  setStudyTitle(" Logic 96mod986test1d");
                  setCursorLabelName("MA1"0);
                  setCursorLabelName("MA2"1);
                  setDefaultBarStyle(PS_SOLID0);
                  setDefaultBarStyle(PS_SOLID1);
                  setDefaultBarFgColor(Color.black0);
                  setDefaultBarFgColor(Color.black1);
                  setDefaultBarThickness(10);
                  setDefaultBarThickness(11);
                  setPlotType(PLOTTYPE_LINE0);
                  setPlotType(PLOTTYPE_LINE1);

                  }
                  var 
                  Symbol1 null;
                  var 
                  vSymbol1 null;
                  var 
                  Interval1 null;
                  var 
                  MAStudy1 null;
                  var 
                  MAStudy2 null;
                  var 
                  aa1 null;
                  var 
                  aa11 null;

                  function 
                  main() {
                  var 
                  MA1MA2;
                      if(!
                  bInit){
                          
                  Symbol1 getSymbol();
                          
                  Interval1 "1";
                          
                  vSymbol1 Symbol1+","+Interval1;
                          
                          
                  MAStudy1 sma(7,close(sym(vSymbol1)));
                          
                  MAStudy2 sma(25,close(sym(vSymbol1)));
                          
                  addBand(0PS_SOLIDColor.black"ZeroLine" );
                          
                  bInit=true;
                      }
                      
                  MA1 MAStudy1.getValue(0);
                      
                  MA2 MAStudy2.getValue(0);
                      
                  aa11 = -4;
                      
                      if(
                  MA1 >= MA2) {
                      
                  setBarThickness(3,0);
                      
                  setBarFgColor(Color.blue,0);
                      
                  setBarThickness(1,1);
                      
                  setBarFgColor(Color.black,1);
                      
                  aa1 4;
                      
                  aa11 0;
                      }else if(
                  MA2 >= MA1) {
                      
                  setBarThickness(1,0);
                      
                  setBarFgColor(Color.black,0);
                      
                  setBarThickness(3,1);
                      
                  setBarFgColor(Color.blue,1);
                      
                  aa1 0;
                      } 
                      return new Array (
                  aa1aa11); 

                  If I am correct in assuming that this efs should only run on a 1 minute chart, the following variation of the above script will remind the user of that, should a different interval be loaded:

                  PHP Code:
                  debugClear();
                  var 
                  bInit false;
                  var 
                  grID 0;

                  function 
                  preMain() {

                  setPriceStudy(false);
                  setStudyTitle(" Logic 96mod986test1f");
                  setCursorLabelName("MA1"0);
                  setCursorLabelName("MA2"1);
                  setDefaultBarStyle(PS_SOLID0);
                  setDefaultBarStyle(PS_SOLID1);
                  setDefaultBarFgColor(Color.black0);
                  setDefaultBarFgColor(Color.black1);
                  setDefaultBarThickness(10);
                  setDefaultBarThickness(11);
                  setPlotType(PLOTTYPE_LINE0);
                  setPlotType(PLOTTYPE_LINE1);

                  }
                  var 
                  Symbol1 null;
                  var 
                  vSymbol1 null;
                  var 
                  Interval1 null;
                  var 
                  MAStudy1 null;
                  var 
                  MAStudy2 null;
                  var 
                  aa1 null;
                  var 
                  aa11 null;

                  function 
                  main() {
                  var 
                  MA1MA2;
                      if(!
                  bInit){
                          
                  Symbol1 getSymbol();
                          
                  Interval1 getInterval();
                          if(!
                  isIntraday() || Interval1 != 1){
                              
                  displayError("ERR: Chart must have a 1 minute interval");
                              return;
                          }
                          
                  vSymbol1 Symbol1+","+Interval1;
                          
                          
                  MAStudy1 sma(7,close(sym(vSymbol1)));
                          
                  MAStudy2 sma(25,close(sym(vSymbol1)));
                          
                  addBand(0PS_SOLIDColor.black"ZeroLine" );
                          
                  bInit=true;
                      }
                      
                  MA1 MAStudy1.getValue(0);
                      
                  MA2 MAStudy2.getValue(0);
                      
                  aa11 = -4;
                      
                      if(
                  MA1 >= MA2) {
                      
                  setBarThickness(3,0);
                      
                  setBarFgColor(Color.blue,0);
                      
                  setBarThickness(1,1);
                      
                  setBarFgColor(Color.black,1);
                      
                  aa1 4;
                      
                  aa11 0;
                      }else if(
                  MA2 >= MA1) {
                      
                  setBarThickness(1,0);
                      
                  setBarFgColor(Color.black,0);
                      
                  setBarThickness(3,1);
                      
                  setBarFgColor(Color.blue,1);
                      
                  aa1 0;
                      } 
                      return new Array (
                  aa1aa11); 
                  }
                  /*************************************************
                               SUPPORT FUNCTIONS                    
                  **************************************************/    
                      
                  //== gID function assigns unique identifier to graphic/text routines
                  function gID() {
                      
                  grID ++;
                      return( 
                  grID );
                  }
                  //== displayError function displays an error to the user
                  function displayErrorErrStr ) {
                      
                  clearText();  
                      
                  drawTextRelative(2050ErrStrColor.maroonColor.lightgrey,  Text.FRAME Text.ONTOP Text.RELATIVETOLEFT Text.RELATIVETOBOTTOMnull16gID());    

                  Last edited by waynecd; 01-22-2009, 10:41 PM.

                  Comment


                  • #10
                    Hi Wayne, Alan,

                    Just wanted to let you know that Murphy's law, in spite of the best of intentions, is alive and kicking.

                    I too had problems running the code as I had 'corrected' it and had to chuckle. I did figure out what is wrong with my spin on the efs btw and recoded the efs successfully.

                    Your recode seems very good at reducing the efs Wayne. You eliminated unnecessary code to reproduce the previous results, kudos for your good work.

                    I attached my updated efs FWIW. It still includes the efsInternal calls if someone wants to look at it. I left much of the structure intact and it is not optimized like Wayne's version.
                    Attached Files

                    Comment


                    • #11
                      Hi Steve,

                      Thanks for the kudos.

                      Alan, Murphy is after me also. It seems he printed the second script twice. So just delete the copy when loading it into the efs editor.

                      Wayne
                      Last edited by waynecd; 01-22-2009, 10:45 PM.

                      Comment


                      • #12
                        Steve & Wayne,

                        Thank you for the assistance in getting the 1 minute crossover to run on the new versiion of the software. After reviewing both EFS, I elected to test Steve's version first. I downloaded the EFS and applied it to 1 minute and 50T charts using ym h9. I reviewd the crossovers for this mornig and the 1 minute and 50T charts matched. After letting the charts run for a while I noticed they went out of sync. I reloaded the 50T script and the crossover line shifted back into sync with the 1 minute chart. After another period of time, the 1 minute chart hung up and stopped adding price bars. I reloaded the script and it went back into sync and continued updating the price bars and the script.

                        My objective is to get the 1 minute 7 - 25 SMA crossover to properly print on the 50T chart without having to reload or interact with the charts during the trading day.

                        Your thoughts as to what is going on would be appreciated.

                        Best Regards,

                        Alan

                        Comment


                        • #13
                          Alan,

                          Your script does not do what you explained on your last post.

                          Look at forum post found at http://forum.esignalcentral.com/show...light=ma+cross

                          or



                          You can modify one or do a forum search for MA Cross, Moving Average Cross, etc.

                          Scripts have already been coded that you can download.

                          Regards,

                          Wayne
                          Last edited by waynecd; 01-23-2009, 09:13 PM.

                          Comment


                          • #14
                            Hi Alan,

                            Here is a script I found in my archives that I modified from a forum script coded by Emet. You can modify practically every parameter via the menu. As coded it plots in it's own pane but if you want to plot the MAs in the price pane just change the "setPriceStudy(false);" to "setPriceStudy(true);". See Attached.

                            I was incorrect in my statement:

                            Your script does not do what you explained on your last post.
                            I correlated a 7 sma & 25 sma with your code and it works as you intended (originally I used ema instead of sma).




                            Wayne
                            Attached Files
                            Last edited by waynecd; 01-25-2009, 01:57 PM.

                            Comment


                            • #15
                              Hi Alan,

                              Hi Alan,

                              Regarding the synchronization issues, Tick charts of interval 50T, depending on the security, can have multiple updates in the time it takes to blink. Perhaps you are seeing something that relates to what is described in these links here and here.


                              The modified efs I posted has several efsInternal calls that are not required as far as I can tell. IMO, they are unnecessarily increasing the resources used by the efs, and can cause problems, especially in fast markets. Unless you have a compelling reason, I would remove them and establish all the moving averages and their associated tests inside the main function.

                              From my understanding of what you described, It sounds like you are loading the same efs in different interval charts, with both efs's being forced to a one minute interval. To minimize the potential for synchronization issues in light of those described in the links I posted, you will need to make the efs's more efficient, similar in structure to what Wayne posted.

                              Hope this helps.

                              Originally posted by Alan2004
                              Steve & Wayne,

                              Thank you for the assistance in getting the 1 minute crossover to run on the new versiion of the software. After reviewing both EFS, I elected to test Steve's version first. I downloaded the EFS and applied it to 1 minute and 50T charts using ym h9. I reviewd the crossovers for this mornig and the 1 minute and 50T charts matched. After letting the charts run for a while I noticed they went out of sync. I reloaded the 50T script and the crossover line shifted back into sync with the 1 minute chart. After another period of time, the 1 minute chart hung up and stopped adding price bars. I reloaded the script and it went back into sync and continued updating the price bars and the script.

                              My objective is to get the 1 minute 7 - 25 SMA crossover to properly print on the 50T chart without having to reload or interact with the charts during the trading day.

                              Your thoughts as to what is going on would be appreciated.

                              Best Regards,

                              Alan

                              Comment

                              Working...
                              X