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 DannyP96, 05-18-2026, 02:38 PM
    1 response
    27 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    117 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    69 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    226 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    417 views
    0 likes
    Last Post CaptainJack  
    Working...
    X