Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Replay vs Back Test results
Collapse
X
-
Glad to hear it was a simple fix. Let us know if you need anything else.
-
Are you running this on CalculateOnBarClose set to True or False?
Leave a comment:
-
Bertrand, thank you for that. It almost works like it is supposed to.
However, it drawing the arrows after the next bar is put in, not when the line first switches. I tried using BarsInProgress to get it to try and calculate intrabar, but that didn't seem to work.
How can I get it to draw the arrows when the line first switches; as apposed to after the next bar is drawn (like it is doing now)?
Once again thank you so much for all your help
Leave a comment:
-
You could access the price data of the 'boxes' generated of course as well in those chart types, give for example this script a try for reversals on your Kagi chart :
...where flip is a variable of type bool.
Code:if (CurrentBar > 1) { if (Close[0] < Low[1] && flip) { DrawArrowDown(CurrentBar.ToString(), 0, High[0] + TickSize, Color.Red); flip = false; } if (Close[0] > High[1] && flip == false) { DrawArrowUp(CurrentBar.ToString(), 0, Low[0] - TickSize, Color.Blue); flip = true; } }
Leave a comment:
-
Even though I cannot back test it, I would still like to be able to set up a PF or Kagi system that trades on the reversals. So lets say after the first 2 Os down in a reversal I would want to buy. Or in a Kagi system I would want to sell when it switches to a thin line
Leave a comment:
-
It'a on our feedback list in product management to enhance this area for our next major update, I've added your vote and input in here as well.
Can you please clarify your second question?
Leave a comment:
-
Is this planning on being fixed anytime soon?
And Is there a way to calculate buys and sells on PF or Kagi indicators?
Leave a comment:
-
Hi cfp, yes that would be a known limitation of backtesting those more exotic bars types like PNF, please see our documentation here on this item - http://www.ninjatrader.com/support/h.../bar_types.htm
You could add more granularity to your backtesting as well, helping to enhance it's accuracy.
You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
Leave a comment:
-
So I think I have finally found what the problem is. When back testing on PF charts, it will give you the first X or O of the reversal, when in fact (if your reversal is 3) your point of entry should be on the 3rd X or O. This is the major source of discrepancy between back testing PF and Automating it. Is this a known issue?
Additionally are there any indicator to trade specifically on PF or Kagi charts? I would like to be able to automate buying and selling at reversals, is this possible?
Leave a comment:
-
cfp,
Why is there differences between replay data, and downloaded tick data if they are both from Zen Fire?"
P&F and Kagi chart styles are "Time independent" as I have outlined before. We use industry standard formulas for the construction of these bar types. They have inherent draw-backs as well as benefits due to the construction method they use. There is no way to peg P&F bars to a specific time intervals, as they are built up based on price movement.
Leave a comment:
-
Why is there differences between replay data, and downloaded tick data if they are both from Zen Fire?
And I have finally found out that all of my issues are simply because I am using Kagi and PF charts. For some reason the back testing does not seem to line up with Market reaplay, and the Market replay has issues, where if I look at the graph it will make trades that are off the lines of the chart.
Is using Kagi and PF a known issue with NinjaTrader? Because I can get my strategies to line up just fine if using Last Minute data, but if I use Kagi Minute data, everything seems to start going wrong.
Leave a comment:
-
cfp,
If you right click your chart and go to "Strategies" you can add a strategy to a chart this way by double clicking it, setting up parameters and then setting the enabled field to true.
There will be differences in data between replay and Zenfire if you downloaded replay data. Do you record replay data?
Leave a comment:
-
Sorry I am still new to all this but, how do you attach a strategy to a chart that has data?
So I ran a test to show you the time difference problem. Both stragies are the SMA strategy provided, ran with 10 and 25 short/long; ran on a 120 second PF chart from 9/23/2012 to 9/28/2012 on the ES 12-12.
Attached are the two trade outputs, and as you can see sometimes the intro time lines up, sometimes the exit lines up but there seems to be no rhyme or reason to the difference. Theoretically the tick data I am using is Zen Fire, and they start on the same data so the chart should be built the same and the should act the same way. Any idea of why this happens?
Leave a comment:
-
cfp,
For your last question there, you would want to attach them to a chart that has a lot of historical data loaded into them already.
As far as your other question, these bar types can be drastically different because of the "time independence". It also may be something in your code. Likely we will need to see an example of what you are doing to isolate it down further than that.
There is no way to have strategies behave exactly like they do in backtesting but you can make it very close using the following : http://www.ninjatrader.com/support/f...ead.php?t=6652
Leave a comment:
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by futurenow, 12-06-2021, 05:49 PM
|
19 responses
979 views
0 likes
|
Last Post
![]()
by Redders
Today, 06:02 AM
|
||
Started by Josephina55, 06-14-2025, 06:30 PM
|
0 responses
17 views
0 likes
|
Last Post
![]()
by Josephina55
06-14-2025, 06:30 PM
|
||
Started by mathfrick2023, 05-08-2025, 12:51 PM
|
8 responses
80 views
0 likes
|
Last Post
![]()
by Yogaman
06-14-2025, 06:01 PM
|
||
Started by several, 04-22-2025, 05:21 AM
|
2 responses
251 views
0 likes
|
Last Post
![]()
by Lukasxgtx
06-13-2025, 06:00 AM
|
||
Started by cherkoul, 06-12-2025, 11:21 PM
|
0 responses
18 views
0 likes
|
Last Post
![]()
by cherkoul
06-12-2025, 11:21 PM
|
Leave a comment: