![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
|
I want to write a strategy to backtest a theory that I can make money trading gaps.
I can't work out how best to implement this. My first attempt was no good because the order is executed on the second bar after the gap is formed, whereas I want to enter at the market as soon as the Open[0] of the first bar arrives. I realise i can do this in real-time with CalculateOnBarClose = false, but this doesn't work in backtesting. The closest I can get is to use 1 minute bars but then I see I miss a considerable number of ticks. Can I place a conditional Market-on-Open i.e. with a stop? I figure this would move into the realm of Unmanaged Orders, as long as I can backtest it. Can't find anything in the Help or the forum messages. Thanks. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Market Replay data gaps? | scootaloo_trader | Version 7 Beta General Questions & Bug Reports | 4 | 09-24-2010 02:57 AM |
| How to start backtesting and trading | freewind | Installation and Licensing | 1 | 01-18-2010 03:41 AM |
| Is it possible to do market replay and backtesting based on market depth? | clearpicks | Indicator Development | 1 | 03-11-2009 04:07 PM |
| Market Gaps and Stop Orders | GreenTrade | Strategy Development | 11 | 01-19-2009 06:26 PM |
| SetProfitTarget works in backtesting but not in live trading. Why? | ooppie | General Programming | 3 | 10-03-2008 09:51 AM |