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 siroki, Today, 03:22 AM
          0 responses
          10 views
          0 likes
          Last Post siroki
          by siroki
           
          Started by nailui, Today, 03:01 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by an.fedorov, Today, 02:32 AM
          0 responses
          10 views
          0 likes
          Last Post an.fedorov  
          Started by rustyspring, Today, 01:31 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by op1031, Today, 12:26 AM
          0 responses
          12 views
          0 likes
          Last Post op1031
          by op1031
           
          Working...
          X