Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

LinReg Multi

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

    LinReg Multi

    This was created by Mike Winfrey and I. Mike gives the following description:

    The LinRegMulti is a CCI look alike but is directly based on price. There is no zero line like with the CCI and also no divergence. This version has 2 components that might interest you aside from the way price is represented. The first is that you have the main LinReg(1) which represents price either as the high, low, close, open, typical or median. I prefer to use typical because it smooths the plot considerably. You can also specify up to 4 more LinReg with different periods. I like to use 6, 9, 12, and 15 because there is enough separation between them that I can actually use it to my advantage. The other feature is that we included smoothing. The LinReg with typical price is relatively smooth anyway but maybe there is utility to smooth is more. LinReg(1) or main plot has a smoothing feature and the others as a unit have one as well. I've experimented with using the LinReg(1) with typical price and the other LinRegs with a smooth set at various settings. Just use your imagination with the settings to see what pops out at you. Personally I like the way they identify the pullbacks so clearly in a way that you get entries at really good places. Takes practice though to feel comfortable taking them.


    As I said above you can have up to 4 alternate LinRegs. So experiment with having just one or all 4 or none.

    You will notice the bars change color, green, red, and gray. Green means all the alternate LinRegs are pointing up. Red means all the alternate LinRegs are pointing down. Gray means the alternate LinRegs are pointing in different directions. Be cautious using them as they don't always refresh properly during the live market. I use them for confirmation but I also have to reload the script to be sure. That can obviously be a problem in the heat of battle. Maybe we can get this fixed at some point. But it isn't a show stopper.

    I think that about covers it except to say that we would appreciate your comments on using it.




    To import:

    - Download the file contained in this thread to your desktop
    - From the Control Center window select the menu File > Utilities > Import NinjaScript
    - Select the downloaded file

    Note that EMA-Multi is just like LinReg-Multi but based on EMA values rather than LinReg ones.

    Attached Files
    Last edited by Gumphrie; 10-06-2008, 01:28 AM.

    #2
    Thanks Gumphrie!
    RayNinjaTrader Customer Service

    Comment


      #3
      LinRegMulti

      Mike Winfrey, Gumphrie,

      I noticed the screenshot of the LinRegMulti doesn't appear the same as my EMA_Multi that I downloaded from this thread. Can you please send a new download link or explain the difference?
      Thanks for your help.

      Kirk

      Comment


        #4
        Originally posted by zeller4 View Post
        I noticed the screenshot of the LinRegMulti doesn't appear the same as my EMA_Multi that I downloaded from this thread.

        Thanks for pointing that out Kirk. The EMA-Multi is a different indicator, just like the LinReg-Multi but based on EMA values rather than LinReg Ones. I have uploaded the correct indicator onto the first post.

        Comment


          #5
          LinRegMulti

          Gumphrie,
          Thanks for the file.

          Kirk

          Comment


            #6
            Just found this thread. I was already using Alternative CCI, and am happy to now find more great stuff from you guys!

            Thx!

            Mike

            Comment


              #7
              Hello Mike Winfrey and Gumphrie,

              I am struggling to access the EMA Multi indicator from another indicator or strategy. I simply want to know if it is "up", "neutral", or "down".

              I tried adding a new DataSeries for a Signal line, and then setting the Signal, but it blew up the "hidden" code "NinjaScript generated code. Neither change nor remove". I've never accomplished that before, so had to restore from a snapshot to get out of that mess (simply removing my statements did not fix the problem it seemed).

              I am likely missing something simple. But, I can't figure it out. You cannot simply look at rising or falling, because it can be falling yet still be "up", or rising and still be "down".

              Mike

              Comment


                #8
                Originally posted by ctrlbrk View Post
                Hello Mike Winfrey and Gumphrie,

                I am struggling to access the EMA Multi indicator from another indicator or strategy. I simply want to know if it is "up", "neutral", or "down".

                I tried adding a new DataSeries for a Signal line, and then setting the Signal, but it blew up the "hidden" code "NinjaScript generated code. Neither change nor remove". I've never accomplished that before, so had to restore from a snapshot to get out of that mess (simply removing my statements did not fix the problem it seemed).

                I am likely missing something simple. But, I can't figure it out. You cannot simply look at rising or falling, because it can be falling yet still be "up", or rising and still be "down".

                Mike
                I moved enum to global namespace and added "Signal" property.
                You can access it EMA_Multi().Signal
                Attached Files

                Comment


                  #9
                  Hi roonius,

                  Thank you for this.

                  It works fine in real time / forward time, but on historical charts once a bar is drawn if you go backwards, then forwards again, the alertseries stays neutral (flat).

                  Code:
                  string permissiontext = " EMA: NO TREND ";
                              System.Drawing.Color permissioncolor = Color.DarkGray;
                              
                              if (EMA_Multi(9, 45, 100, 200, EMAMultiPlots.Three, 1).Signal[0] == 1)
                              {
                                  permissiontext = " EMA: LONG ";
                                  permissioncolor = Color.CornflowerBlue;
                              }
                              
                              if (EMA_Multi(9, 45, 100, 200, EMAMultiPlots.Three, 1).Signal[0] == -1)
                              {
                                  permissiontext = " EMA: SHORT ";
                                  permissioncolor = Color.Maroon;
                              }
                              
                              DrawTextFixed("Permission", permissiontext, TextPosition.BottomLeft, Color.White, new Font("Arial", 8, FontStyle.Bold), permissioncolor, permissioncolor, 7);
                  I will look into a solution as well.

                  Mike

                  Comment


                    #10
                    Mike,

                    Try this, slide the chart bar all the way back to the beginning of the chart. Then, right click and select reload Ninjascript. Now inch the chart forward slowly and see if you get a response to the alerts.

                    This worked for me with Cycle Identifier to spot false alerts that got removed as the chart is moved forward.

                    RJay
                    RJay
                    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                    Comment


                      #11
                      Hi RJay,

                      Yes that worked.

                      Thx,
                      Mike

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by mmckinnm, Today, 01:34 PM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by Conceptzx, 10-11-2022, 06:38 AM
                      3 responses
                      60 views
                      0 likes
                      Last Post NinjaTrader_SeanH  
                      Started by f.saeidi, Today, 01:32 PM
                      1 response
                      2 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by traderqz, Today, 12:06 AM
                      9 responses
                      16 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by kevinenergy, 02-17-2023, 12:42 PM
                      117 responses
                      2,766 views
                      1 like
                      Last Post jculp
                      by jculp
                       
                      Working...
                      X