Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

user defined input in condition

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

    user defined input in condition

    Hello,

    I would like define condition where CCI > user defined input.
    When I configure this condition in AT wizard, the syntax is: CCI(14)[0] > HI_level,where HI_level is user defined input, integer, default 50.

    But it is not functional.
    But when CCI is compared to "Numeric value" which is hard seted to 50 ( CCI(14)[0] > 50 ) , it is working.

    Please, can anybody help me how can I insert my user defined input to this condition?

    Many thanks

    #2
    Hello,

    Please provide a screen shot of your Conditions and Actions window so we can see exactly what you have.

    Please confirm that you are defining your user defined input as an integer.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello,

      I've attached a few screenshots.
      1st - I would like add conditions when cci cross above/below line for example at level +/- 200.
      2nd - I define intg variables for entry and exit level
      3rd - I define condition for entry to short position
      4th - compare cci with user defined input (it is predefined to 200 at pic 2)
      Attached Files

      Comment


        #4
        You use Position.Quantity == 0. A better condition may be to use Position.MarketPosition == MarketPosition.Flat.

        I do not see anything wrong with your strategy. You should be placing trades whenever CCI > -150. Do you see any errors in your Control Center logs when you run the strategy?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thank you for tips.
          I tried to backtest this strategy in strategy analyser and result is "curious".
          During main trade time was condition satisfied only 1 time, but I have much fills. See pic. 1,2
          But when I set limit for entry to market manually (I meen CCI(14)[1] > 200), It's working good. Pic. 3.
          I really don't know what is wrong.
          Attached Files

          Comment


            #6
            If you are interested you can see scripts at

            Comment


              #7
              Pokert,

              Go back to your User Defined Inputs page and make your variables doubles. Then try again.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                I found it now.
                All this conditions are working in full range of values, defined in user defined inputs declaration window between default and min value. That's mean, if I declare min value same like default value, the condition is working only for this exact value, because there is not range.

                Comment


                  #9
                  Glad you got it resolved.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by jxs_xrj, 01-12-2020, 09:49 AM
                  6 responses
                  3,290 views
                  1 like
                  Last Post jgualdronc  
                  Started by Touch-Ups, Today, 10:36 AM
                  0 responses
                  9 views
                  0 likes
                  Last Post Touch-Ups  
                  Started by geddyisodin, 04-25-2024, 05:20 AM
                  11 responses
                  62 views
                  0 likes
                  Last Post halgo_boulder  
                  Started by Option Whisperer, Today, 09:55 AM
                  0 responses
                  8 views
                  0 likes
                  Last Post Option Whisperer  
                  Started by halgo_boulder, 04-20-2024, 08:44 AM
                  2 responses
                  25 views
                  0 likes
                  Last Post halgo_boulder  
                  Working...
                  X