• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto-trade entry based on High or Low for a Time Period

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

    Auto-trade entry based on High or Low for a Time Period

    Hello,

    I would like to program an auto-trade system to do the following for an instrument:

    {
    Enter long if the highest high from 4:00 AM to 7:00 AM is broke after 7:00 AM
    Or
    Enter short if the lowest low from 4:00 AM to 7:00 AM is broke after 7:00 AM
    }

    Would someone be able to help me with the programming?

    Thanks so much


    #2
    Hello centrino2,

    This can be achieved with a time filter. We have an example of this type of programming in the help guide.

    https://ninjatrader.com/support/help...to_limit_t.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the feedback.

      I agree the time filter would be helpful. I was looking at examples and was unable to extract the following zip file:

      SampleGetHighLowByTimeRange

      Would someone be able to paste the reference code from this zip file?

      The link is under “Reference Samples” then “Indicator” then “Calculating the highest high or lowest low for a specfic time range”.

      Thanks so much

      Comment


        #4
        Hello centrino2,

        The script you have provided is for NinjaTrader 7.

        To import a script into NinjaTrader 7 do the following:
        1. Download the script to your desktop, keep it in the compressed .zip file.
        2. From the Control Center window select the menu File > Utilities > Import NinjaScript
        3. Select the downloaded .zip file
        4. NinjaTrader will then confirm if the import has been successful.
        Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.


        Also, just in case, I am including a link to the help guide where you can find the NinjaTrader 8 version of this script.
        https://ninjatrader.com/support/help...est_high_o.htm

        To import a NinjaScript into NinjaTrader 8 do the following:
        1. Download the script to your desktop, keep it in the compressed .zip file.
        2. From the Control Center window select Tools -> Import -> NinjaScript...
        3. Click the Desktop icon on the left to navigate to the desktop
        4. Select the downloaded .zip file -> then click Open
        5. NinjaTrader will then confirm if the import has been successful.
        Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you so much, very helpful.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by EnveousColnago, Yesterday, 05:43 PM
          7 responses
          36 views
          0 likes
          Last Post Lancer
          by Lancer
           
          Started by PeterGolz, 01-17-2020, 10:42 AM
          11 responses
          73 views
          0 likes
          Last Post reubenlasky  
          Started by utilizator, Today, 11:36 AM
          0 responses
          4 views
          0 likes
          Last Post utilizator  
          Started by EnveousColnago, Today, 07:24 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by tornadoatc, Today, 10:31 AM
          0 responses
          4 views
          0 likes
          Last Post tornadoatc  
          Working...
          X