Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exiting Before the Hour

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

    Exiting Before the Hour

    I am working on a strategy that I will be using to trade hourly options. Since hourly options expire on the hour, I want to be able to close out my position just before the hour ends (1 or 2 minutes before). However, since I am using Range Bars, with a setting of COBC = true, the close of the bar essentially never coincides with the hourly time change. Is there a way to force a position close, if one is open, just before the hour closes? In essence is there a way to programmatically get around the limitation of COBC=true for a time change?
    Thanks
    DaveN

    #2
    daven,

    Options shouldn't be supported on NinjaTrader.

    You could use a multi-timeframe strategy here that gives you minute-by-minute updates.



    Then, just separate your strategy logic as follows.

    Code:
    if ( BarsInProgress == 0 )
    {
    
    // all your hourly code here
    
    }
    else if ( BarsInProgress == 1)
    {
    
    // all your minute code here
    
    }
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    61 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,288 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X