Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Tradingsystemanalysis => Log not saved
Collapse
X
-
Tags: None
-
Hello sidlercom80,
Thank you for your post.
Please test the SampleMACrossOver strategy that comes default with NinjaTrader in the Strategy Analyzer.
Do you see the same behavior occur when backtesting the SampleMACrossOver strategy?
If so, please provide the exact steps taken to reproduce the behavior so I may test it on my end.
I look forward to assisting further.
Brandon H.NinjaTrader Customer Service
-
Hi _BrandonH, no, it just doesn't seem to fit my strategy. With the SampleMACrossOver everything is ok. but where could be the problem, what should I look for?
Comment
-
Hello sidlercom80,
Thank you for your note.
I am unable to determine exactly what may be causing the behavior you are seeing. Ultimately, debugging steps should be taken to see how the strategy is behaving when running a backtest.
To understand why the script is behaving as it is, such as placing orders or not placing orders when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.
In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).
Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
https://ninjatrader.com/support/foru...121#post791121
Please let me know if I may further assistBrandon H.NinjaTrader Customer Service
Comment
-
Brandon you got me wrong The strategy is executed correctly, all the results are correct. The only problem is that the result is not stored in the log, but is overwritten during the retest. Only the most recent back test is always saved. The results of the back test of my strategy are not saved, but the results of SampleMACrossOver for example are saved.
I made a short video, there you can see the problem: http://www.youtube.com/watch?v=ZV1ZptGtrNU
Comment
-
Hello sidlercom80,
Thank you for your note.
Since the behavior does not occur when testing the SampleMACrossover strategy this likely means there is an issue with your strategy that is causing the behavior.
When working with any issue, it is important to take steps to isolate the issue so that the exact line causing the behavior can be found. This is a process of elimination and a process of debugging by adding prints.
First, it's great to create a copy of the script so that the original work is kept safe. Once the copy is created, the copy can be modified in any way without losing the original work.
Below is a link to a video that demonstrates making a copy of a script.
https://www.youtube.com/watch?v=BA0W...utu.be&t=8m15s
The next step is to start commenting out code. It is helpful to think about when the error is occurring to target areas, and comment code from everywhere else quickly. If at any point after removing some code, the error stops, add the last removed item back. This is likely where the issue is occurring in the script.
Let us know if we may assist further.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by WHICKED, Today, 12:56 PM
|
1 response
8 views
0 likes
|
Last Post Today, 01:17 PM | ||
Started by cre8able, Today, 01:16 PM
|
0 responses
1 view
0 likes
|
Last Post
by cre8able
Today, 01:16 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
2 responses
47 views
0 likes
|
Last Post
by chbruno
Today, 01:15 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
1 response
11 views
0 likes
|
Last Post Today, 01:08 PM | ||
Started by samish18, Today, 01:01 PM
|
0 responses
5 views
0 likes
|
Last Post
by samish18
Today, 01:01 PM
|
Comment