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

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.

    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.


        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 Gerik, Today, 09:40 AM
          2 responses
          6 views
          0 likes
          Last Post Gerik
          by Gerik
           
          Started by RookieTrader, Today, 09:37 AM
          2 responses
          10 views
          0 likes
          Last Post RookieTrader  
          Started by alifarahani, Today, 09:40 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by KennyK, 05-29-2017, 02:02 AM
          3 responses
          1,285 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by AttiM, 02-14-2024, 05:20 PM
          11 responses
          186 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X