• 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

Script to tell a strategy not to trade during certain hours

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

    Script to tell a strategy not to trade during certain hours

    As part of an IF statement in a strategy, is it possible to instruct the strategy to not look for trades during certain hours. Essentially the code would still be enabled, but the script would instruct it not to trade.

    I'm working a forex strategy, and I don't want the strategy to trade between 3:50pm - 5pm CDT. Is it possible to write something like this into the code?

    #2
    Hello CMillz,

    Yes, this would be possible using a time filter. You could say, if time was outside of this range, return;

    Please see the following reference example,
    http://ninjatrader.com/support/forum...ead.php?t=3226

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by chartish, Today, 04:43 PM
    0 responses
    7 views
    0 likes
    Last Post chartish  
    Started by Trader17, Today, 04:07 PM
    0 responses
    4 views
    0 likes
    Last Post Trader17  
    Started by GussJ, Today, 01:30 PM
    2 responses
    18 views
    0 likes
    Last Post GussJ
    by GussJ
     
    Started by GARZONJ, Today, 12:25 PM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by RandanAL, Today, 11:53 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X