![]() |
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: Mar 2009
Posts: 292
Thanks: 12
Thanked 1 time in 1 post
|
Dear NT support,
I’m working with a colleague on a strategy. We are at the live testing a strategy. I am having some problems with it. He is running it using IB’s feed into a SIM101 account. I am running it using E-signal’s live feed. I am having problems when applying the strategy to a Chat window. The strategy appears to be processing the 1 min bars correctly when applied in the strategy tab. However, it doesn’t appear to be working or processing the bars correctly when applied to the chart. I have checked that the chart has enough days included (I have now adjusted that to 50 – whereas the strategy only requires 32). Any other ideas of areas to check? Additional information: It adds a additional timeframe of 1440 mins (simulate a day’s trading). Thanks and regards, Dan |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Dan, are you testing on NT 65 or 7? On the charts in NT7 you would need to set 'enabled' to 'true' for it to start and process data.
Any errors in your log tab as it does not seem to work from a chart? It showing as running then in the strategies if you'd loading it from the chart? Are you both using the same min bars required settings? (the strategy would start trading if all series fulfill this criterion).
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2009
Posts: 292
Thanks: 12
Thanked 1 time in 1 post
|
Bertrand,
Thanks for your reply. I am using 6.5 as NT 7 is still in beta. I am seeing no errors in any of the logs. I have also attached Visual Studio to NT and am not seeing an logic errors thrown. I have just been working with my colleague against the live market and the strategy has been taking positions with his IB account whereas it hasn’t with mine. I have made adjustments to the min bar required as I have had problems with this before. I have inserted these checks into the code, which I have used successfully with other strategies. Code:
if (CurrentBar <= 35)
return;
in the primary timeframe Code:
if (BarsArray[1].CurrentBar <= 35) return; Dan |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Thanks Dan, have you tried simplifying to see where the issue might be? For example if you comment out the added daily frame logic, does it change the behavior then? If you add the daily and have the bars check for 35 bars, then you would not have sufficient data likely loaded with your stated amount in the first post, so I suspect this is the issue likely here.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2009
Posts: 292
Thanks: 12
Thanked 1 time in 1 post
|
Bertrand,
Thanks very much for your reply. I have commented out large chunks of code, this doesn’t appear to help. I have tried to adding sufficient data (e.g. setting Min bars required to 40) this does not work either. Kind regards, Dan |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Dan, thanks - hmm then I would add Prints to the various code sections to see what is called and what not, so you could then proceed from there. Is the strategy worked on your friends PC using your eSignal? This way we could exclude the connection then...if you like I could run this on my eSignal here as well and see if I can reproduce this behavior.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Mar 2009
Posts: 292
Thanks: 12
Thanked 1 time in 1 post
|
Bertrand,
Thanks again for your reply. We might have to take you up on your offer to run it against a chart at your end. I have now got it running against the crosses what appears to be successfully within the strategy tab (after some modifications to the code). However, we can’t cannot getting it running when applied to a chart. Should I forward a copy of the code though to the support mailbox? Thanks and regards, Dan |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi Dan,
That would be great. If you send to support@ninjatrader.com, be sure to reference this thread: http://www.ninjatrader-support2.com/...ad.php?t=28796
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Mar 2009
Posts: 292
Thanks: 12
Thanked 1 time in 1 post
|
Ryan / Bertrand,
Thanks very much for your continued support. Good news. I’ve managed to fix this. Though, it was a funny one. Our strategy requires about 30 days (1440) of min data. I had been setting the charts to bring in 40 days to be sure we had enough data on the chart. In work this weekend I’ve set the chart to 60 days and it started to work. I’m not really sure was is happening there; 40 days should have been sufficient. Thanks and regards, Dan |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Dan, great to hear - I could only explain this by your min bars required setting, as for 1440 mins a default setting of 20 would be essentially 20 days before the strategy would start processing, if you add your custom need of 30 to this, you end up with a min of 50 days needed.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error Message when Applying Template | FatCanary | Version 7 Beta General Questions & Bug Reports | 13 | 12-04-2009 05:10 PM |
| Applying TradeBullet to NT | tooearly | Connecting | 4 | 08-05-2009 09:24 AM |
| Applying Strategies | heyligerb | Automated Trading | 3 | 05-06-2009 05:42 AM |
| Applying indicators to a chart (for backtestring). | strategy1 | Charting | 7 | 07-26-2008 11:21 PM |
| Applying Stochastics to SMA | jeremymgp | Indicator Development | 1 | 12-03-2007 11:37 PM |