• 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

Assistance with exit strategy using intra day data

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

    Assistance with exit strategy using intra day data

    I am struggling to achieve what seems like a relatively simple task:

    If yesterday's close is above EMA I want to enter long at the open and exit on the close of the same day.

    From what I gather I need to use intra day data. I have followed the example below:

    http://www.ninjatrader.com/support/f...ead.php?t=6652

    But the problem I am getting is that the exit price is from the previous bars close rather than the current bars close.

    Any suggestions would be much appreciated.
    Attached Files

    #2
    Hello Beach01,

    Using the Strategy Analyzer it is going to process your Strategy with Calculate On Bar Close true, so that mean once all of your conditions are your Strategy is going to enter the market at the open of the next bar.

    With your Exit condition looking at a Minute Time-frame most instruments will have an overnight session that is going to be triggering to Exit your Position when you are not wanting it to. You may want to change your time frame between a time period so that you can better close out of your position before the new session starts for example:

    Code:
    if (enteredLong && 
         ToTime(Times[1][0]) <= 160000 && ToTime(Times[1][0]) >= 155500)	
    
    ExitLong();
    Let us know if that works better for you.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by yeshujbp, 07-21-2019, 02:40 PM
    2 responses
    32 views
    0 likes
    Last Post omololu
    by omololu
     
    Started by seagraph, Yesterday, 03:27 PM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by NinjaCustomer, Today, 09:37 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_DrewO  
    Started by stalt, Today, 07:52 AM
    6 responses
    16 views
    0 likes
    Last Post stalt
    by stalt
     
    Started by im197, 07-30-2019, 12:29 PM
    2 responses
    10 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X