Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Replay vs Back Test results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Matthew
    replied
    Glad to hear it was a simple fix. Let us know if you need anything else.

    Leave a comment:


  • cfp462
    replied
    That was exactly the problem, thank you guys for all your help.

    Leave a comment:


  • NinjaTrader_Matthew
    replied
    Are you running this on CalculateOnBarClose set to True or False?

    Leave a comment:


  • cfp462
    replied
    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:


  • NinjaTrader_Bertrand
    replied
    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:


  • cfp462
    replied
    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:


  • NinjaTrader_Bertrand
    replied
    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:


  • cfp462
    replied
    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:


  • NinjaTrader_Bertrand
    replied
    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:


  • cfp462
    replied
    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:


  • NinjaTrader_AdamP
    replied
    cfp,

    Why is there differences between replay data, and downloaded tick data if they are both from Zen Fire?"
    Market replay data is downloaded from our servers, Zen-fire data is different. This would explain a lot of the difference in your P&F and Kagi charts. Different tick data, different bar construction.

    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:


  • cfp462
    replied
    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:


  • NinjaTrader_AdamP
    replied
    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:


  • cfp462
    replied
    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?
    Attached Files

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    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 NinjaCustomer, 03-13-2019, 05:40 AM
5 responses
194 views
0 likes
Last Post octaviogarcia  
Started by Oracletrades, 02-21-2020, 01:37 PM
11 responses
2,036 views
0 likes
Last Post Ttrade12  
Started by crewtrades, Today, 10:50 AM
2 responses
9 views
0 likes
Last Post crewtrades  
Started by Ttrade12, Yesterday, 01:06 PM
3 responses
13 views
0 likes
Last Post Ttrade12  
Started by samish18, Today, 05:11 PM
0 responses
1 view
0 likes
Last Post samish18  
Working...
X