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 WHICKED, Today, 12:56 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cre8able, Today, 01:16 PM
    0 responses
    1 view
    0 likes
    Last Post cre8able  
    Started by chbruno, 04-24-2024, 04:10 PM
    2 responses
    47 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by WHICKED, Today, 12:45 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by samish18, Today, 01:01 PM
    0 responses
    5 views
    0 likes
    Last Post samish18  
    Working...
    X