![]() |
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2009
Location: Chicago
Posts: 154
Thanks: 0
Thanked 0 times in 0 posts
|
What am I doing wrong here? Assuming that the primary bar is a daily bar and the secondary bar is a 10 min bar. I'm trying to buy at the next daily open based on signal generated from current daily bar and liquidate if the 10 min bar violates the previous bar's low:
protected override void OnBarUpdate() { if(BarsInProgress==0) { if(Close[0]>High[1]) { EnterLong("buy"); } } if(BarsInProgress==1) { if(Closes[1][0]<Low[0]) { ExitLong(1,1,"sell","buy"); } } } |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Backtest Granularity | tlan294 | Strategy Development | 2 | 01-19-2009 07:26 AM |
| Can you really Backtest NT with an intrabar granularity? | calin | Strategy Development | 1 | 12-03-2008 08:53 AM |
| What's the benefit of the intra-bar granularity sample? | tradefaz | General Programming | 7 | 09-02-2008 09:56 AM |
| Intrabar granularity | eswap0 | General Programming | 7 | 06-08-2008 03:10 PM |
| Why is hour granularity unsupported? | henry.omd | Miscellaneous Support | 1 | 12-24-2007 09:53 AM |