Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy authority structure

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

    strategy authority structure

    Hello,

    I have a developed strategy that has a time filter for continued back-testing, i need to keep the time filter. however under no circumstances do I want trades during the 08:30 est announcements . is there a why to configure a strategy with just a time filter to override the other configured strategies?

    Also need to ask, the code for the current time filter isn't going to work, can someone point me in the direction of examples of how to code for two separate time sections ? I.e. 1800 thru 0815 next day and then 0845 thru 1530 or would I need to put as three 00:00 thru 0815, 0845 thru 1530, and 1800 thru 2359?

    Thanks in advance

    p22

    #2
    Hello Paladin22,

    Thank you for your post.

    There is not a way to configure a strategy that contains only a time filter that could be used to override other strategies. Time filter logic will have to be programmed in each individual strategy.

    Instead, you could create a time filter that checks if the time is 0000 - 0815, or 08:45 - 15:30, or 18:00 - 23:59 and enters a position. The time filter would look something like this:

    if ((ToTime(Time[0]) >= 180000 && ToTime(Time[0]) < 81500) || (ToTime(Time[0]) >= 84500 && ToTime(Time[0]) < 153000) || (ToTime(Time[0]) >= 180000 && ToTime(Time[0]) < 235900))
    {
    // Entry Signal: If current close greater than previous close, enter long
    if (Close[0] > Close[1])
    EnterLong();
    }

    Please see the SampleTimeFilter script in the help guide link below for more information.

    SampleTimeFilter - https://ninjatrader.com/support/help...to_limit_t.htm

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    43 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    48 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X