Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Strategy Analyzer - Not running?
Collapse
X
-
Strategy Analyzer - Not running?
When I loaded my instrument/strategy and time frame etc...and click on the run button in strategy analyzer nothing happens. How can i and to see trace of what's happening?Tags: None
-
Hello priceisking,
Thanks for your post.
So I may be of better assistance, can you please tell me the following?
- Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy?
- Who are you connected to? This is displayed in green on lower left corner of the Control Center window.
- Are you connected to your data feed provider when running this test?
- What instrument(s) (and expiry if applicable) have you selected?
- What Data Series Type have you selected? Example: Tick, Minute, Day
- What From and To date is selected?
- Is your strategy a multi instrument or multi time frame strategy?
- Do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
Josh G.NinjaTrader Customer Service
- Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy?
-
Hi Josh,
Yes. I do see test results when running SampleMaCrossOver strategy with the same settings.
Connected to Interactive Brokers. It shows green an another strategy is currently running in sim101 .
I'm not connected to any other feed provider. Doing this test on ES 12-18 . This is run on on tick and 5 minute chart. I've tried putting in 09/01 to 09/18 .. i've changed it to 01/01/18 to 09/19/2018 and still no difference. Single instrument only on single time frame. No errors in the log in control center and no errors on screen.
Let me know if this helps.
Comment
-
-
Looks like an issue with my code indeed. I see this in the log now:
Error on calling onbarupdate method on bar 1 - index was outside the bounds of the array.
This is how it starts:
protected override void OnBarUpdate()
{
Print("Entered OnBarUpdate: " + Close[0] + " Open: " + Open[0] );
if (CurrentBars[0] < BarsRequiredToTrade || CurrentBars[1] < BarsRequiredToTrade)
return;
Print("CurrentBars:" + CurrentBars[0] + "BarsRequiredToTrade " + BarsRequiredToTrade + " CurrentBars: " + CurrentBars[1]);
if (BarsInProgress == 0)
{
if (CurrentBar == 0 || Bars.IsFirstBarOfSession)
sessionIterator.GetNextSession(Time[0], true);
// if after the exit on close time, prevent new orders until the new session
if (Times[1][0] >= sessionIterator.ActualSessionEnd.AddSeconds(-ExitOnSessionCloseSeconds) && Times[1][0] <= sessionIterator.ActualSessionEnd)
exitOnCloseWait = true;
// reset for a new entry on the first bar of a new session
else if (exitOnCloseWait && Bars.IsFirstBarOfSession)
exitOnCloseWait = false;
Comment
-
I cannot tell where the error is coming from with this snippet. It looks like you are trying to access an index that doesn't exist yet. You noted previously that you were working with a single time frame and instrument but you are trying to access multiple time frames in your snippet. Is that your intent?
Help Guide - CurrentBars
Have you added a data series so that you can check CurrentBars[1] ?Josh G.NinjaTrader Customer Service
Comment
-
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
55 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
3 responses
9 views
0 likes
|
Last Post Today, 03:23 PM | ||
Started by jordanq2, Today, 03:10 PM
|
2 responses
8 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
47 views
0 likes
|
Last Post Today, 02:36 PM |
Comment