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

bool used twice. in different sets

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

    bool used twice. in different sets

    is it alright to use the same bool "true" in two sets. i have if profit of ticks X amount in one set, and profit of ticks Y amount in another set. and, they both didn't get accepted this morning when the trade position was open with the bool true.

    #2
    Hello SteveReiza,

    Thank you for your post.

    Yes, it would be alright to check if the same bool is "true" in two different sets. To understand why certain conditions were or were not met or certain actions were or were not taken, have you enabled Trace Orders and/or added prints to your strategy?


    If not, I suggest doing so to better understand your strategy's behavior and see how the conditions were evaluated when you expected the actions from the sets to be executed.

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. alright, sweet. good to know. this is what i have as an exit - the attached image. that all looks correct, right?
      Attached Files

      Comment


        #4
        Hello SteveReiza,

        Thank you for your reply.

        I won't be able to tell you if it's "correct" just from looking at it. It is up to you to test the strategy and decide if it is behaving as expected or not, and this will let you know if you have configured it correctly or not. What are your results from testing? Do you see the order being submitted in the Trace Orders output, or are there any messages showing it was ignored or rejected?
        Do you have any information configured on the Stops and Targets screen of the builder as well? If so, this could be the issue as you can not combine Stops and Targets that use the Set() methods with actions to submit a non-market Exit() order. This is due to the Internal Order Handling Rules That Prevent Unwanted Positions listed here:


        If a combination of Set() and Exit() methods is the case, you should see TraceOrders output stating that one of the orders was ignored with a note about why.

        Please let us know if we may be of further assistance.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. i have trace orders enabled. is it something i can go back and look at in the output window? or do i need to have it open when it happens to see it?

          i don't have stops or targets.

          i noticed that one of them loads after the 2 minute bar completes. this is a 35 second bar entry. i have multiple timeframes in the strategy. so, as the trade position is open and active there is a lull to when the exit position stop order is accepted in the orders tab. that lull is when the 2 minute bar is completed. doesn't make sense because i have it on tick update.

          the tick ones are the ones that aren't being accepted. i have the bool in two sets. with two different exit position stop orders.

          Comment


            #6
            Hello SteveReiza,

            Thank you for your reply.

            Output in the NinjaScript Output window is only generated while the strategy is running, so you need to have it open when it happens to see it. Trace Orders output is not something that you can go back and look at. Please test your strategy again while the NinjaScript Output window is open and review the output. You could even test it in the Playback Connection over the same period of time when you observed the behavior:


            Thank you for your time and patience.
            Emily C.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. okay sweet, i'll do a playback with the output window open and see what happened.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by rhyminkevin, Today, 04:58 PM
              3 responses
              47 views
              0 likes
              Last Post Anfedport  
              Started by iceman2018, Today, 05:07 PM
              0 responses
              5 views
              0 likes
              Last Post iceman2018  
              Started by lightsun47, Today, 03:51 PM
              0 responses
              7 views
              0 likes
              Last Post lightsun47  
              Started by 00nevest, Today, 02:27 PM
              1 response
              14 views
              0 likes
              Last Post 00nevest  
              Started by futtrader, 04-21-2024, 01:50 AM
              4 responses
              50 views
              0 likes
              Last Post futtrader  
              Working...
              X