Announcement

Collapse
No announcement yet.

Trigger buy when SMA turns positive

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

  • Trigger buy when SMA turns positive

    Hi!

    I am learning efs and need some help.

    How do I easy with formula wizard trigger a buy when SMA20 turns positive. This bar is highter than prev bar.

    What is the diffrence between offset an numbars?

    RSy

  • #2
    Pretty simple....

    You can do it with the formula wizard or you can use the templates I put up in my "7-15 Chat" files.

    The "chat" files include working proto-types of code that you can use to back-test with esignal.

    All you would need to do is convert the ENTRY TRIGGERS (from candlestick patterns) to your SMA pattern.

    If you need help with this, let me know. But I suggest you take a look at those examples and see if you can understand them. Then, try to modify the code to meet your needs.

    If you run into trouble, let me know.

    Brad
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Will you please explain how to do it in the wizard.
      I tried SMA20 < SMA20, offset 1.

      RSy

      Comment


      • #4
        Hello RSy,

        Have you been through the Formula Wizard Guide in our EFS Help Center & Library? If not, please go through the guide and Example #3 listed at the end of the guide. This should be enough teach you how to accomplish what you need.
        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
          Well.... this did'n teach me how to make a formula for buy when sma21 is higher than prev and sell when sma21 is lower than prev.

          I know how to make buy and sell signal when the bars change, but I need to know how to make signals on turns up and down for SMA.

          RSy

          Comment


          • #6
            Here you go...

            This is a modification to one of my "chat" examples.

            This should give you everything you need (and more).

            Brad
            Attached Files
            Brad Matheny
            eSignal Solution Provider since 2000

            Comment


            • #7
              RSy
              The attached efs shows you one of the ways in which you can do it using only Formula Wizard.
              The system Buys (if not already Long) every time the value of the SMA21 is greater than the prior and goes Short (if not already Short) every time it is lower.
              It also plots a lime up-arrow when going Long and a red down-arrow when going Short.
              Hope this helps
              Alex
              Attached Files

              Comment


              • #8
                Thank you very much Alex and Doji333. So the right to do is like I wrote in my second post in this thread - to buy when SMA is gretaer than same SMA with offset -1.

                Thanks a lot. I am learning and it is great with some help.

                Again sorry for my bad english, but I hope you guys understand me.

                Have a nice weekend.

                RSy

                Comment


                • #9
                  RSy

                  So the right to do is like I wrote in my second post in this thread - to buy when SMA is gretaer than same SMA with offset -1

                  That is correct. The (-1) simply identifies the value of the SMA of one period ago (0 being the current bar index).
                  Once you have identified the condition you then have multiple ways of issuing Buy/Sell orders. In the prior message I proposed one method but you could also write it as shown in the attached efs.
                  If you backtest either one on the same data set you should come up with the exact same values.
                  Notice that in this case I do not check for a pre-existing condition but use a different function of the Formula Wizard to achieve the same result.

                  Thanks a lot. I am learning and it is great with some help

                  On Brad's and my behalf you are most welcome. This is exactly the purpose of the forum ie to make it easy for people to exchange experiences and assist each other.

                  Alex
                  Attached Files

                  Comment


                  • #10
                    Thanks, and good morning Alex!

                    Do you have any experience with the Jurik tools?
                    I am wondering about buying them.

                    Is it easy to use Jurik JMA on RSI to make buy/sell?

                    RSy

                    Comment


                    • #11
                      RSy
                      Sorry no experience whatsoever. There is a dedicated forum though and you may want to post your question there. I am sure there are plenty users who will be willing to comment on the merits of the tools.
                      Alex

                      Comment

                      Working...
                      X