• 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 IanC28, 03-27-2020, 10:20 AM
    6 responses
    21 views
    0 likes
    Last Post jim1234
    by jim1234
     
    Started by aramtrader, Yesterday, 03:05 PM
    7 responses
    38 views
    0 likes
    Last Post woodie1
    by woodie1
     
    Started by renehtx, Today, 03:51 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by eidog2020, Today, 03:31 PM
    0 responses
    6 views
    0 likes
    Last Post eidog2020  
    Started by Lowerlevel1, Today, 01:34 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X