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.



    Please let me know if I can assist you any further.
    JoydeepNinjaTrader 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.



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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,223 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        438 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        10 views
        0 likes
        Last Post FAQtrader  
        Working...
        X