Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy active between time X and time Y

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

    Strategy active between time X and time Y

    Here is a simple question that I have not found the answer to:

    How do I make a strategy that only takes positions between (for example) 09:00 in the morning and 20:00 at night? I have tried to make a condition with time values in the strategy analyzer, but I can't figure out how to make the strategy only be active between two time values.



    Background info: I use the VWAP indicator found here on the forum for a mean reversion strategy on the YM and ES contracts (and others). When price exceeds X standard deviations above or below VWAP, a trade is triggered. However, the calculations for the VWAP indicator is restarted every midnight at 00:00 so the standard deviations becomes to small, giving my strategy a lot of false values at night. Therefore, I only want the strategy to trigger during daytime.

    #2
    Best would be to not set session times in the Strategy Analyzer but to add code to limit trading hours -



    For the strategy wizard you can add those - http://www.ninjatrader-support.com/H...mparisons.html

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    89 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    92 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    70 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    87 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    64 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X