Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Changing the inputs in the menu

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

    Changing the inputs in the menu

    Hi,

    I have a strategy with a few inputs, which are the position entry prices. Depending on market conditions I change them before starting the strategy. In the basic script in strategy builder the inputs are fixed on exact meanings.
    Click image for larger version

Name:	Screenshot_2.jpg
Views:	179
Size:	55.0 KB
ID:	1084956
    And as I see on the test chart - it works. There are trade markers as you may see.

    Click image for larger version

Name:	Screenshot_1.jpg
Views:	179
Size:	131.7 KB
ID:	1084955
    But if I change the inputs in the start menu (without reprogramming the script in the builder itself) - the new prices do not work. However, the logic of the strategy remains same.

    Click image for larger version

Name:	Screenshot_3.jpg
Views:	220
Size:	97.0 KB
ID:	1084957

    Maybe, because there are commas, but script can read dots... Maybe some other reasons? What may be the problem?

    #2
    Hello Aporshnev,

    Thanks for your post.

    If your strategy is working with the defaults that appear to be set with commas I would expect new values to be treated the same.

    Can you post a screenshot of where the inputs are used in the condition builder?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Here you go: Set1; Set2; Set3 a so on...

      Click image for larger version

Name:	Screenshot_1.jpg
Views:	160
Size:	77.4 KB
ID:	1084983

      Click image for larger version

Name:	Screenshot_2.jpg
Views:	166
Size:	78.7 KB
ID:	1084984

      Click image for larger version

Name:	Screenshot_3.jpg
Views:	170
Size:	78.7 KB
ID:	1084985

      Comment


        #4
        The logic is associated with the price graterEqual of UserInput wich I call "LEVEL"

        Click image for larger version

Name:	Screenshot_4.jpg
Views:	205
Size:	64.3 KB
ID:	1084989

        Click image for larger version

Name:	Screenshot_5.jpg
Views:	179
Size:	101.5 KB
ID:	1084990

        Comment


          #5
          Hello Aporshnev,

          Thanks for your reply.

          I don't see anything obvious in your conditions that would be an issue.

          What I suggest at this point would be to have the strategy builder print out what values it is working with.

          I've attached a short video that shows a process of building a print statement for debugging purposes. In your case I would suggest printing out the various inputs to see if they match your defaults and then to see that they match when you input the new values.


          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Paul, Thnx for the video. It appears that given the logic GreterEqual, I need to place my price levels ascending if I play short, so that the first level should be the closest to the market. If the inputs scheduled descending, then script is confused and doesn`t work...


            Click image for larger version

Name:	Screenshot_1.jpg
Views:	164
Size:	198.2 KB
ID:	1085133
            Click image for larger version

Name:	Screenshot_2.jpg
Views:	189
Size:	112.9 KB
ID:	1085134

            Click image for larger version

Name:	Screenshot_3.jpg
Views:	158
Size:	166.7 KB
ID:	1085135

            Click image for larger version

Name:	Screenshot_4.jpg
Views:	209
Size:	127.2 KB
ID:	1085136

            Comment


              #7
              Depends on what you are doing. Anything being triggered on multiple conditions that should be greater than some values, must be evaluated from the highest to the lowest. That is the only way mathematically and logically that you can ensure that the conditions fall through to lower values. Conversely, conditions triggered by something being lower than values must be evaluated from the lowest to the highest. Keyword: MUST.

              Comment


                #8
                Hello Aporshnev,

                Thanks for your post.

                I agree with member Koganam's reply in post #7.

                The order/sequence must be coded relative to the direction.
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by elderan, Today, 08:03 PM
                0 responses
                3 views
                0 likes
                Last Post elderan
                by elderan
                 
                Started by algospoke, Today, 06:40 PM
                0 responses
                10 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                9 views
                0 likes
                Last Post maybeimnotrader  
                Started by quantismo, Today, 05:13 PM
                0 responses
                7 views
                0 likes
                Last Post quantismo  
                Started by AttiM, 02-14-2024, 05:20 PM
                8 responses
                169 views
                0 likes
                Last Post jeronymite  
                Working...
                X