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.

    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:

        World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


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





        Please let us know if we may be of any further assistance.

        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.

            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.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  71 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  143 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  76 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  47 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  51 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X