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

Stop Entry in Strategy Builder

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

    Stop Entry in Strategy Builder

    Hello Support Forum,

    I’m trying to enter a trade in Strategy Builder using a stop entry. I want to be stopped into my trade at the High of the current bar plus one tick. I’m using daily bars. In the Conditions and Actions window, I’m selecting “Enter long position by a stop order”. I’m using the High from Price value and adding 0.1 for the tick value. The order does not seem to be executing on the next bar when I run it on the Strategy Analyzer. I tried using High[-1] but that did not work either.

    Would appreciate your help in figuring this out. Let me know if you need any screen shots.

    Thanks
    Gennaker

    #2
    Hello,
    Thanks for your post.
    • Are you entering into a long position before you expect for your Long Stop Market order to be filled?
    • Do you see any errors on your logs tabs?

    To use the value for the High of the current bar plus one tick you would use High[0]+TickSize. In the Strategy Builder, for your High Price value, set "Bars ago" to 0. Then for the "Offset" properties set "+", "1" , and then select "Ticks" from the drop down menu.

    I look forward to your reply.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Josh,
      • I am not trying to use a stop exit. I want to use a stop order to enter into a position.
      • I did not see any errors in the log.


      Thanks
      Gennaker
      Last edited by Gennaker; 01-16-2018, 09:41 AM.

      Comment


        #4
        Gennaker,
        • Did you notice a difference when you changed your tick value from "0.1" to "1" ?
        • Are you sure your conditions are being met?
        • Please try running the "Sample MA Crossover" strategy through the Analyzer and let me know if you also do not receive results in that test.

        Also, please send me a screenshot of your conditions and actions, as well as your Strategy Analyzer settings.
        To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

        Click here for instructions

        Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

        Click here for detailed instruction
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Stop Entry in Strategy Builder

          Josh,

          The Sample MA Crossover works so there must be something wrong with my strategy. Attached is a zip file with screen shots of the following input forms:
          • Input and Variables
          • Conditions and Action
          • Stops & Targets
          • Strategy Analyzer with no results
          • Error Log

          On the conditions and Actions form I tried to enter Close[0] > Open[0] but it keeps showing Default input[0] > Open[0]
          Attached Files

          Comment


            #6
            Hello,

            The builder changing that input to 'Default input' is expected, so nothing to worry about there. You can double check to make sure your code is correct by clicking "View Code" at the bottom left of the builder.

            One reason that you may not be receiving results is your second condition will never evaluate to true.

            Code:
            SMA(MovingAveragePeriod)[0] > SMA(MovingAveragePeriod)[0]
            Since MovingAveragePeriod is a constant value of 14, that condition is comparing two identical SMA's that are referencing the same bar. You will need to change either the period of one of the SMA's or the referenced bar for that to be a valid condition.

            Please let me know if your strategy does not provide results after making that change.
            Last edited by NinjaTrader_JoshG; 01-17-2018, 09:01 AM.
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              Josh,

              Looks like the two SMA's having the same date you highlighted was the problem.

              Thanks for your help
              Gennaker

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              5 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,266 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              13 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X