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
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Quanto, Today, 02:17 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
    24 responses
    124 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Skifree, Today, 11:21 AM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by manueldecastro, Today, 01:16 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by tradingnasdaqprueba, Today, 03:42 AM
    9 responses
    35 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X