• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatic Trend Line Detection and Alert

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

    #46
    Originally posted by NinjaTrader_Ray View Post
    This is an indicator I published for the September 07 issue of S&C. This indicator is provided on an "as-is" basis.

    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
    Hi there,

    Can somebody help me on converting CS File to Mq4. I've downloaded it but still no avail in using it.

    Thanks & cheers.

    Comment


      #47
      mat j, welcome to our forums! Unfortuantely we can't assist you on converting your NinjaScript files to MQ4.
      BertrandNinjaTrader Customer Service

      Comment


        #48
        Import failed

        I tried to import the AutoTrendLine.zip from post #1 but get an error message -
        Import Failed. There are NinjaScript files in the imported NinjaScript Archive File that hav programming errors. These errors must be resolved before you can import the NinjaScript Archive File.

        Any suggestions? Thanks
        winja

        Comment


          #49
          you need to go to your indicator folder, move the most recent indicator to somewhere else, also delete user define file, try compiling again, keep doing that until you are able to compile then you know which indicator gives you the trouble.

          Comment


            #50
            Nt7

            any one be able to import auto trendline file into NT7 Beta??
            Thanks
            Mike

            Comment


              #51
              Please try this one shared here.
              BertrandNinjaTrader Customer Service

              Comment


                #52
                Thanks

                Bertrand
                Thank you verymuch for your fast respond
                I imported and work fine

                Thank you again

                Mike

                Comment


                  #53
                  Mike, I believe some people can and are indeed able to import auto trendline file into NT7 Beta....at least that is my understanding...

                  Comment


                    #54
                    lock off

                    Hi Bertrand

                    Regarding this code, What I have to do to unlock the trend line just in case. I try to move it and give me a red lock sign, I try to save it as unlock but it is going back next tick to be locked.


                    Thanks
                    Mike

                    Comment


                      #55
                      Try adding this below to Initialize() -

                      Code:
                       
                      AllowRemovalOfDrawObjects = true;
                      BertrandNinjaTrader Customer Service

                      Comment


                        #56
                        Thanks Bertrand

                        I try this and it is not working on calculate on bar close false or true.
                        just I want be able to move the TL in Auto Trendline indicator by the mouse.

                        Thanks
                        Mike

                        Comment


                          #57
                          Sorry Mike, to unlock the drawn objects, you can set locked to false programmatically with this snippet here in the OnBarUpdate() code portion - http://www.ninjatrader.com/support/h...drawobject.htm
                          BertrandNinjaTrader Customer Service

                          Comment


                            #58
                            Thanks Bertrand

                            I did that and I have been able to move the past TL not the current one??

                            Thanks Again

                            Mike

                            Comment


                              #59
                              Sorry don't follow you, if I apply this on the code I referenced on # 51 I see one current ray drawn and it's unlocked i.e. freely movable then after this snippet is added.
                              BertrandNinjaTrader Customer Service

                              Comment


                                #60
                                Thanks Bertrand

                                Yes I add on # 51.

                                I attach a copy of the code, I may missing something, thanks for help me.
                                if you don't mind would you please check it.

                                Thanks
                                Mike
                                Sorry it deosn't let me attach the full code here but if I get you email I will email it to you






                                ///<summary>
                                /// This method is used to configure the indicator and is called once before any bar data is loaded.
                                ///</summary>
                                protectedoverridevoid Initialize()
                                {
                                DisplayInDataBox =
                                false;
                                CalculateOnBarClose =
                                true;
                                Overlay =
                                true;
                                PriceTypeSupported =
                                false;


                                }
                                ///<summary>
                                /// Called on each bar update event (incoming tick)
                                ///</summary>
                                protectedoverridevoid OnBarUpdate()
                                {
                                // Loops through the DrawObjects collection
                                foreach (IDrawObject draw in DrawObjects)
                                {
                                // Unlocks all draw objects for manual manipulation on the chart
                                draw.Locked = false;
                                }






                                // Calculate up trend line
                                int upTrendStartBarsAgo = 0;
                                int upTrendEndBarsAgo = 0;
                                int upTrendOccurence = 1;

                                while (Low[upTrendEndBarsAgo] <= Low[upTrendStartBarsAgo])

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by uday12, Today, 02:36 PM
                                0 responses
                                0 views
                                0 likes
                                Last Post uday12
                                by uday12
                                 
                                Started by swcooke, Today, 02:01 PM
                                1 response
                                6 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Started by guidoisot, Today, 01:11 PM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_PatrickG  
                                Started by martyn73, Today, 12:26 PM
                                0 responses
                                11 views
                                0 likes
                                Last Post martyn73  
                                Started by uday12, Today, 09:45 AM
                                0 responses
                                9 views
                                0 likes
                                Last Post uday12
                                by uday12
                                 
                                Working...
                                X