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

Script help

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

    Script help

    deleted -ignore
    Last edited by kyamato; 11-12-2017, 11:38 PM.

    #2
    Hello kyamato,

    Thanks for the post.

    You can create a condition set comparing the current price and the high price one bar ago. You can then add an offset value to create the gap condition.

    My screenshot demonstrates using a tick offset. You also have the option to choose between pips and arithmetic offsets.

    Please let us know if we may be of any further assistance.
    Attached Files
    Last edited by NinjaTrader_DrewO; 01-15-2020, 01:26 PM.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      How about making sure this gap is touching the high or low of the day?

      Comment


        #4
        Hello,

        Thanks for the follow up.

        Please see this video I made on how to accomplish this condition set:

        Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


        I am also including links to the Strategy builder help guide as well an overview of the Strategy builder on Youtube:



        Get started with NinjaTrader software & the SuperDOM for FREE: http://ninjatrader.com/GetStartedIn this video, learn how to use the NinjaTrader Strategy Buil...


        Please let us know if we may be of any further assistance.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          For some reason the script seems to skip the beginning of the trade and waits till the 2nd bar to begin? Why doesn't it activate right away on the Bar close condition?

          Comment


            #6
            Hello kyamato,

            Thanks for the reply.

            Is your Strategy's "CalculateOnBarClose" set to "true" or "false"? If it is set to true, try setting it to false, a.k.a "Calculate on Each Tick". See if this setting produces the behavior you expect.

            Note* Logic may need to be handled differently when calculating on each tick. Calculate On Bar Close means that OnBarUpdate() will be called at the end of every bar. Calculate on Each Tick means that OnBarUpdate() will be called on every incoming tick.

            I look forward to hearing of your results.
            Last edited by NinjaTrader_DrewO; 01-15-2020, 01:27 PM.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Hi Chris,

              It didnt work.

              It still giving me a delay of exactly 5 minutes (using 5 minute bars). So when bar closes at 9:59:59 the strategy should start at 10

              Instead its waiting till 10:05.

              Any other solutions?

              Comment


                #8
                I found the issue,

                For some reasons on my charting platform the time of the bar begins at 11:15, however NT8 seems to show this bar at 11:20.

                While the data is the same why does NT8 shows all bars (for RTH NYSE) as being "delayed" by 5 minutes?

                Comment


                  #9
                  Hello kyamato,

                  Thanks for the follow-up.

                  This could be caused by the way NinjaTrader timestamps bars. NinjaTrader will timestamp a bar at the closing time of that bar. Your data feed and charting platform could be processing this differently. Look into how your charting software timestamps bars and compare it to how NinjaTrader handle timestamps. It sounds like this is where the discrepancy is coming from.

                  Please see this link that explains further on how bars are built in NinjaTrader:
                  https://ninjatrader.com/support/help...ldingChartBars

                  If we may be of any further assistance, please let us know.
                  Last edited by NinjaTrader_DrewO; 01-15-2020, 01:27 PM.
                  Chris L.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Aviram Y, Today, 05:29 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post Aviram Y  
                  Started by quantismo, 04-17-2024, 05:13 PM
                  3 responses
                  25 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by ScottWalsh, 04-16-2024, 04:29 PM
                  7 responses
                  34 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by cls71, Today, 04:45 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post cls71
                  by cls71
                   
                  Started by mjairg, 07-20-2023, 11:57 PM
                  3 responses
                  216 views
                  1 like
                  Last Post PaulMohn  
                  Working...
                  X