• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy

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

    Strategy

    Hello,

    why is the realprice buy ( or sell) different from the backtested buy or sell?

    When part of the strategy is; go long if c(0) is greater tha o(0); this means if bar closes higher than opening of bar; go long. In the backtest the buy actually & visually starts at the OPEN of the second green, rather than the closeprice of the first green.

    I do have the iwmeanrenko bar.

    This way your longs and shorts are too optimistic, about half the bar size.

    Any comments?

    Regards,

    Rob

    #2
    Hello Rob,
    In backtesting orders are submitted at the close of the bar. Thus the orders are getting filled at the 2nd bar instead of the first.

    http://www.ninjatrader.com/support/h...ime_vs_bac.htm

    Please let me know if I can assist you any further.
    Joydeep M.NinjaTrader Customer Service

    Comment


      #3
      I understand, but this means, with the meanrenko, that every long and short in backtests shows HALF a bar size too optimistic. It starts at the beginning of the ( next) bar, while the real enty is in the middle of teh bar ( same as end of previous bar) What can i do about this ( re-write strategy, use slippage of half a bar) If the last is an option, where do I find this, any ideas how to tackle this problem? Rob

      Comment


        #4
        Hello Rob,
        To get proper fills while backtesting with MeanRenko bars you have to either use limit orders or as you said, set appropriate slippage.

        You can either code the slippage in the NinjaScript strategy itself by or by setting an appropriate slippage from the strategy parameter box while backtesting it.

        http://www.ninjatrader.com/support/h...l?slippage.htm

        Please let me know if I can assist you any further.
        Attached Files
        Joydeep M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ct, Today, 01:57 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by 7robert, Today, 01:13 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Newtrader101, Today, 12:52 PM
        2 responses
        7 views
        0 likes
        Last Post Newtrader101  
        Started by 7robert, Today, 12:23 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by brownsfan019, Today, 12:52 PM
        3 responses
        9 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Working...
        X