Announcement

Collapse
No announcement yet.

change color

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

  • change color

    Is it possible to edit the MA1 and MA2 without actually editing the .efs itself? Maybe be able to edit study in esignal?

    And, is it possible to have the MA1 change colors when it's below the MA2 (red would be great).

    I tried to add these features but it wouldn't work.

    Thanks.

    Bruce
    Attached Files

  • #2
    Bruce
    It is not possible to edit the parameters using Edit Studies when the formula is written with the Formula Wizard.
    With regards to painting the MA1 in red when it is below the MA2 see the image enclosed below. Notice that I have added a ,0 after the RGB values. That assigns the command to the first element of the returned array. If you wanted to color the MA2 instead you would have used ,1. BTW if you look in preMain you will see a similar syntax for each statement related to the plots
    Alex

    Comment


    • #3
      Alex:

      I was able to do as you suggested and also added the line:

      setPlotType(PLOTTYPE_INSTANTCOLORLINE);

      But it doesn't seem to work.

      Any suggestions?

      Bruce
      Attached Files

      Comment


      • #4
        Bruce
        You don't need to add the INSTANTCOLORLINE statement manually.
        That plot type is already available in the Formula Wizard's dropdown menu (see image)
        Alex

        Comment


        • #5
          Thanks Alex....works great.

          Bruce

          Comment


          • #6
            Alex:

            I've never done a back testing study. How would I go about converting this study into a back testing study?

            Bruce

            P.S. also, I didn't create this study, I found it in the archives and just edited it with....your help.
            Attached Files

            Comment


            • #7
              Bruce
              You would simply need to add the Strategy commands to be executed when the conditions are true.
              As an example you can use the Three Bar Breakout Trading System shown in this article of the EFS KnowledgeBase.
              Also if you search the EFS Back Testing or the EFS Formula Wizard forums you should find other examples of strategies created using the Formula Wizard only
              Alex

              Comment


              • #8
                Alex:

                I was able to find a similar back testing study.

                I tried to get the ma1 to change colors by adding the line as I did before and adding the ,0....but didn't work. I changed some things in it and got it to work but then the back testing ddn't work.

                I guess I'm a bad programer.

                What I need is to get the ma1 to change colors and I'd like to have arrows to appear where the trades took place?

                bruce

                P.S. I really did try to figure this out but.....I'm not very good at this stuff.
                Attached Files

                Comment


                • #9
                  Alex:

                  I finally figured it out (adding text and alerts).

                  I still can't figure out how to change the MA1 color (when it goes below MA2).

                  And, is it possible to have the back test only done during certain hours?

                  Bruce
                  Attached Files

                  Comment


                  • #10
                    Bruce
                    You need to add the specific conditions to paint the moving average when MA1 is below MA2. The conditions you currently have in the script only identify when the two averages cross over.
                    As to back testing only during certain hours please see this reply I gave you two years ago in response to the same question.
                    Alex

                    Comment


                    • #11
                      Alex:

                      Prior to posting the time frame request I did go back and looked at all the other studies that had time frames. Unfortunately, all of these studies were not created in the Wizard. I did try and cut and paste some of the language into this current study but they didn't work.

                      I also looked into the Wizard and couldn't find anything that looked like the time frames language.

                      Is it possible to do the time frames in the wizard? If so, just a general outline should do it.

                      Bruce
                      Attached Files

                      Comment


                      • #12
                        Bruce
                        You can use the same time conditions as those shown in the thread I indicated earlier (see enclosed image)
                        Alex

                        Comment


                        • #13
                          Alex:

                          I added the line as you suggested but when I check the coding I get a syntax error.

                          I'm now stuck.

                          Any suggestions?

                          Bruce

                          P.S. sorry for being such a pain.
                          Attached Files

                          Comment


                          • #14
                            Bruce
                            You are missing a closing parenthesis (shown here in red) in all instances of (getHour()*100)+getMinute()
                            Alex

                            Comment


                            • #15
                              I can't believe I didn't see that...must be my age....thanks.

                              One more thing...

                              Can I close the trade (close-sorry) at a certain time?

                              Bruce
                              Attached Files
                              Last edited by InvGrp2; 11-10-2005, 06:54 PM.

                              Comment

                              Working...
                              X