![]() |
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 Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I have a strategy coded in NinjaTrader as below: protectedoverridevoid OnBarUpdate() { if(Historical) { if(Low[1]>=value1 && High[1]<value2 && Low[0]<=value3) { EnterLong("MD_348_002"); } } } NB:value1,value2 and value3 are my variables The strategy working fine. But the entry date shown in trade report is the next day of the entry date expected. ![]() Can anyone help me??? I need to fix it urgently...
Last edited by TintuLal; 09-22-2009 at 11:00 PM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,398
Thanks: 252
Thanked 968 times in 951 posts
|
TintuLal, welcome to the forums - are you testing this on daily bars?
To see the entry take place on the next bar would be expected in backtesting, to workaround this you could add another finer bars series for simulating intrabar execution - http://www.ninjatrader-support2.com/...ead.php?t=6652
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Yes...I'm testing this on daily bars. Then, as you mentioned I have added one intrabar series (15 min bars). But now it is taking long time to load data... Anyway, I require daily data because I need to check some conditions on the previous day bar.Then if that satisfies along with some conditions in current day, I need to "Enter Long" in current day. Any other workarounds possible to enter long in current day using daily data only? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,398
Thanks: 252
Thanked 968 times in 951 posts
|
How many days are you backtesting with this setup now?
Just check the 'one day back' conditions on the daily series, while doing the 'current day' checks on the added 15 min series, then submit the orders to the 15 min series for intraday execution.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Sep 2008
Posts: 183
Thanks: 0
Thanked 1 time in 1 post
|
Quote:
http://www.ninjatrader-support2.com/...ad.php?t=13993 NT is trying to protect us from doing unrealistic basktests by purchasing at a "past price", but the flexibility lost is a problem for those of us that know what we are doing, especially with daily/weekly/monthly/yearly bars. Other similar tools I've used don't have this limitation. |
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Is there any way to change the date?
|
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Sep 2008
Posts: 183
Thanks: 0
Thanked 1 time in 1 post
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cancelling Order/Entry Order filled cancels all other entry orders | ScottB | ATM Strategies (Discretionary Trading) | 2 | 06-03-2009 12:19 PM |
| Entry at open | tjendra | Automated Trading | 39 | 05-07-2009 11:49 AM |
| Bars Since Entry | nigeleyre | Strategy Development | 2 | 10-08-2008 08:33 AM |
| Chart changing entry position at end of day | b-rock | Charting | 3 | 09-20-2008 04:33 PM |
| Forex Day chart only shows one bar | atrader101 | Connecting | 4 | 03-07-2008 11:45 AM |