Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set a stop that moves up after hitting a certain unrealized tick gain

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

    #16
    I didn't have the bars since execution in a group "if any" not sure why that was the hang up but I got it working.

    Comment


      #17
      I figured out it wasn't taking trades due to the bars since exit.

      I guess it needed to be in a group.

      Now I'm getting this error when trying to run it through playback.

      It will make a few trades then once that error pops up no more trades will take place.

      Assuming that's some type of fail switch to not make any more trades after that error.



      Attached Files

      Comment


        #18
        Hello Prestonf,

        In the videos, I am placing the prints in OnBarUpdate() one line above the condition being investigated (and in a blank condition set one set before the condition set being investigated in the Strategy Builder).

        The print includes the time of the bar and all values being compared in the condition being investigated and includes labels for all values and comparison operators.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Thanks I figured out why it wasn’t taking trades but now I’m having that new problem.

          In post NinjaScript File Sharing it will take a few trades then none and if I reload the script all the trades it did take will disappear.

          Comment


            #20
            Post # 18 on here

            Comment


              #21
              Hello Prestonf,

              Sounds like it isn't placing trades in historical.

              Please add the State to the print output and provide the print output text file with your next post so we may assist in analyzing what is causing the behavior.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #22
                How would I Print the BarCountStart, BarCountStop, BarsAfterExit, etc?

                Then that compile problem.





                Attached Files

                Comment


                  #23
                  Hello Prestonf,

                  I'm not sure what BarCountStart BarCountStop, BarsAfterExit are. Are these variables you have declared. Are these integers?

                  Lets focus on that after we have resolved the first issue, and work on one thing at a time.

                  Currently, your inquiry is why is the condition to submit the limit order not evaluating as true.

                  Lets finish debugging this, by printing all of the values in that condition set with the time of the bar.

                  Then we can focus on the next issue of printing your custom variables.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #24
                    Hey Chelsea thanks for your response, I did get the strategy to limit fill short.

                    It was a problem with not having certain conditions in a group.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Today, 05:17 AM
                    0 responses
                    50 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    126 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    69 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    42 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    46 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X