• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Function for the closed market

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

    Function for the closed market

    Hello,

    I am looking for a function to identify the vacations in which Mercado closed so that ToDay (Time [0] is always open market day.

    Example:

    if (ToDay (Time [0]) = Market Closed) return;

    #2
    Hello,

    Thanks for the post.

    May I clarify, are you asking how to detect holiday days for a market?

    If this is your question, NinjaTrader will not run your script due to there being no market data to drive the script. If NinjaTrader detects there is no data while running a strategy, the OnBarUpdate function till not run.

    You can use a session iterator to find the beginning and end of a session. Please see the help guide for an example of how to use a session iterator:
    https://ninjatrader.com/support/help...oniterator.htm

    Please let us know if we may be of any further assistance.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GMiller64, Today, 01:13 PM
    3 responses
    5 views
    0 likes
    Last Post GMiller64  
    Started by itrader46, Today, 12:51 PM
    4 responses
    30 views
    0 likes
    Last Post itrader46  
    Started by hemlock, Today, 11:45 AM
    3 responses
    9 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by gbulle, Today, 11:31 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JPPoulin, Today, 10:43 AM
    6 responses
    20 views
    0 likes
    Last Post JPPoulin  
    Working...
    X