Announcement

Collapse
No announcement yet.

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:

        https://www.screencast.com/t/aocAbzSzFjl

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

        https://ninjatrader.com/support/help...gy_builder.htm

        https://www.youtube.com/watch?v=B__cetyO_5s

        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 Renejm, Today, 06:17 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Renejm
                  by Renejm
                   
                  Started by kazisl, Yesterday, 06:41 PM
                  2 responses
                  10 views
                  0 likes
                  Last Post NinjaTrader_PaulH  
                  Started by impactX, 05-04-2021, 01:07 AM
                  2 responses
                  11 views
                  0 likes
                  Last Post NinjaTrader_Melissa  
                  Started by op1031, Yesterday, 05:51 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_PaulH  
                  Started by aaadetos, 05-04-2021, 09:28 AM
                  3 responses
                  14 views
                  0 likes
                  Last Post NinjaTrader_Heath  
                  Working...
                  X