Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using wizard..exit with cci

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

    Using wizard..exit with cci

    How can I Use the wizard and have the strategy exit when cci crosses -+100

    I have set the wizard in following condition : cci (16) to crossbelow numeric value 100 to exit ....but it does not exit it waits to hit the stoploss

    I have also use the if cci one bar ago was above 100 and now its below 100 exit
    same ressults.....What am I doing wrong?

    1- is the numeric value should be something else?

    Any advise it greatly appricated!!

    #2
    Hello,

    Thanks for your forum post.

    You would need to use ExitLong() and setup a condition to trigger. So use a new a new set in the strategy wizard to build this exit condition. If CCI indicator CrossAbove as your center condition and on the right do Misc->Numeric Value and then plug in 100 as the numeric value.

    Then in the do the following: setup the ExitLong() to take place when this occurs.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thanks for your forum post.

      You would need to use ExitLong() and setup a condition to trigger. So use a new a new set in the strategy wizard to build this exit condition. If CCI indicator CrossAbove as your center condition and on the right do Misc->Numeric Value and then plug in 100 as the numeric value.

      Then in the do the following: setup the ExitLong() to take place when this occurs.

      Let me know if I can be of further assistance.
      Brett,
      Thanks for you quik reply!

      This is what I have in my view code:

      // Condition set 2
      if (CrossBelow(CCI(Exitcci), 100, 1))
      {
      ExitLong(
      "exitlong100cross", "exitlong100cross");

      exitcci i use either 16 to 20

      Comment


        #4
        Hello,

        Looks about right. You may want to add in one more condition to onnly trigger if the Strategy Position is Long then you want to trigger ExitShort however this is optional. You will need to set up this same exit conditions for short if your strategy also goes short.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Brett View Post
          Hello,

          Looks about right. You may want to add in one more condition to onnly trigger if the Strategy Position is Long then you want to trigger ExitShort however this is optional. You will need to set up this same exit conditions for short if your strategy also goes short.

          Let me know if I can be of further assistance.
          How would I add the condtion to only trigger if the postion is long... using the wizard ?
          sorry I am not a programmer.

          Thanks,

          Comment


            #6
            Hello,

            Sure, Please see the attached.

            Let me know if I can be of further assistance.
            Attached Files
            BrettNinjaTrader Product Management

            Comment


              #7
              Originally posted by NinjaTrader_Brett View Post
              Hello,

              Sure, Please see the attached.

              Let me know if I can be of further assistance.

              Brett,

              I did all that, still not exiting as specificed...what could I be doing worng?


              Thanks,

              Comment


                #8
                Hello,

                Suggest adding Print Statements to see what code gets executed when to check to see if your condition ever becomes true.

                Add this under Do the following-> Misc-> Print To Output window.

                Put some message in here to see if it even gets executed or not. Then troubleshoot from there.

                If you still cant get it please post your complete strategy and i will get it a quick run on my side.

                I look forward to assisting you further.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  Originally posted by NinjaTrader_Brett View Post
                  Hello,

                  Suggest adding Print Statements to see what code gets executed when to check to see if your condition ever becomes true.

                  Add this under Do the following-> Misc-> Print To Output window.

                  Put some message in here to see if it even gets executed or not. Then troubleshoot from there.

                  If you still cant get it please post your complete strategy and i will get it a quick run on my side.

                  I look forward to assisting you further.
                  Hello,

                  I do not see Print To Output window in Misc.....is it because I am using nt 6.5?

                  Comment


                    #10
                    Hello,

                    Its there in 6.5, just make sure you are clicking on the Add button for the Do The following section not the when the following conditions occur section.

                    I look forward to assisting you further.
                    BrettNinjaTrader Product Management

                    Comment


                      #11
                      Originally posted by NinjaTrader_Brett View Post
                      Hello,

                      Its there in 6.5, just make sure you are clicking on the Add button for the Do The following section not the when the following conditions occur section.

                      I look forward to assisting you further.

                      Please see attached....
                      Attached Files

                      Comment


                        #12
                        Hello Kian,

                        This is for defining conditions. You have to click OK on this box, and printing output is one of the actions you can take. Please see attached screenshot.
                        Attached Files
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_RyanM View Post
                          Hello Kian,

                          This is for defining conditions. You have to click OK on this box, and printing output is one of the actions you can take. Please see attached screenshot.

                          See attached.... this is what I have where do I get the output results from?
                          Attached Files

                          Comment


                            #14
                            You view in the tools > output window.

                            Debugging your NinjaScript Code
                            Ryan M.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_RyanM View Post
                              You view in the tools > output window.

                              Debugging your NinjaScript Code

                              You can see the attached ,,,,there is nothing in output window.....there is some activity going on...but no results are printed.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              648 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              369 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              108 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              572 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              574 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X