Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter 3 ticks above or bellow of the closing bar

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

    Enter 3 ticks above or bellow of the closing bar

    Hello everyone.
    I have a strategy when Close[0] < Open[0], enter short and Close[0] > Open[0], enter long.
    I want to enter short 3 ticks bellow the closing of that bar and enter long 3 ticks above the closing of that bar and i do not know how to do that.
    Anyone can help me, please?
    Thank you.

    #2
    Hello mario2306,

    Thanks for your post.

    To place a sell order 3 ticks below the price of the bar, you will need to place a stop market (or stop limit) order.

    In the Strategy Wizard actions section, this is the option to Enter short position by a stop order under Order management. Which creates EnterShortStop().
    • Click the Add button in the Do the following section
    • Expand Order Management -> select Enter short position by a stop order
    • In the stop price click the ellipses button "..." to choose value
    • Select Price data -> Close
    • Add -3 to the Offset below
    • Click OK -> click OK
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      ChelseaB thank you for your answer.
      I made the changes how you told me, but when i press enabled to the strategy nothing plot on the chart and the strategy not work.

      Comment


        #4
        Hello mario2306,

        May I test your script on my end?

        If so, please attach an export of the script to your next post.

        To export your script do the following:
        1. Click File -> Utilities -> Export NinjaScript
        2. Enter a unique name for the file in the value for 'File name:'
        3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
        4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


        By default your exported file will be in the following location:
        • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


        Below is a link to the help guide on Exporting NinjaScripts.
        http://www.ninjatrader.com/support/h...nt7/export.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Here is my strategy.
          Thank you.
          Last edited by mario2306; 11-04-2014, 02:53 PM.

          Comment


            #6
            Hi mario2306,

            I have tested your script using the ES 12-14 1 Minute data from Jan 1st to today and found it placed 568 trades.

            Are you sure that the script is enabled?

            How many days to load is on your chart?

            (I am seeing a trade that was entered 20 minutes ago and exited 8 minutes ago.)
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I tried only on the unirenko bars.
              Now i see, does not work on the unirenko, but the rest of the bars are ok.
              Thank you very much for your help.
              Last edited by mario2306; 11-03-2014, 02:10 PM.

              Comment


                #8
                Now i want to add another condition to my strategy but again i do not know how to do that.
                I want to enter only if MACD from another time frame is rising or falling.
                It is posible to do that?

                Comment


                  #9
                  Hi mario2306,

                  To add a condition to an already existing condition set, click the Add button to add a condtion.
                  • On the left select Misc -> Rising
                  • In the Series input below click the ellipses button "..."
                  • Select Indicators -> MACD -> click OK
                  • On the right select Mics -> True
                  • Click OK
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    I know how to add a condition, i do not know how to add MACD from another time frame.

                    Comment


                      #11
                      Hi mario2306,

                      Multiple time frames are not possible with the Strategy Wizard.

                      If you want to use multiple time frames you will need to unlock your script and use Add() to add a timeframe.
                      http://www.ninjatrader.com/support/h...s/nt7/add3.htm

                      Then use the bars array index of that added script.

                      For example:

                      SMA(BarsArray[1], 19)[0]

                      or

                      SMA(Lows[1], 19)[0]

                      http://www.ninjatrader.com/support/h.../barsarray.htm
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      633 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      364 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      105 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      567 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      568 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X