• 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

Exiting on market with historical tick data

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

  • NinjaTrader_Bertrand
    replied
    Hi Wayne, in backtesting the script would have per default access to the OHLCV info of the primary series and conditions / trades are processed with CalculateOnBarClose = true. That means when you bar has closed > it would process the exit then on the next tick / open of next bar. You could submit to another / finer series though in backtesting to simulate intrabar fills here.

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

    Leave a comment:


  • waynewright33
    started a topic Exiting on market with historical tick data

    Exiting on market with historical tick data

    I have 3 years of ES tick data. I am backtesting a strategy that Enters with a massive stop loss and a small profit target.

    I have a section of code that once in a position checks a condition from an indicator in a different time frame.

    It says

    if(blah blah)
    ExitLong("longtrade");

    The problem is, this exits the position at the next traded tick. This is unrealistic. I need it to exit at the close of the last bar +1. So if (blah blah) is a 1 min bar, and it closes, giving the indicator the data it needs to check the condition, then I want to exit at that price plus one tick against me, in order to simulate always taking the market price.

    I've read for hours on this forum and been able to answer all my questions, except for this one. So I just want to know how can I do this?

    Thanks in advance,

    Wayne

Latest Posts

Collapse

Topics Statistics Last Post
Started by jhoenle, Today, 06:38 AM
0 responses
8 views
0 likes
Last Post jhoenle
by jhoenle
 
Started by margaretcain, Today, 06:17 AM
0 responses
4 views
0 likes
Last Post margaretcain  
Started by Herrwolf1, Today, 05:11 AM
1 response
14 views
0 likes
Last Post NT-Roland  
Started by Knortzsch, Today, 05:26 AM
0 responses
14 views
0 likes
Last Post Knortzsch  
Started by aitropap, Today, 05:19 AM
0 responses
3 views
0 likes
Last Post aitropap  
Working...
X