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 Touch-Ups, Today, 08:42 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post Touch-Ups  
                  Started by obiwan_cashobi, Today, 05:50 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post obiwan_cashobi  
                  Started by janefoster, Yesterday, 11:50 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post janefoster  
                  Started by kaywai, 07-13-2024, 09:05 PM
                  3 responses
                  34 views
                  0 likes
                  Last Post kaywai
                  by kaywai
                   
                  Started by stafe, Yesterday, 01:32 PM
                  2 responses
                  31 views
                  0 likes
                  Last Post stafe
                  by stafe
                   
                  Working...
                  X