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 wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        192 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,234 views
        0 likes
        Last Post xiinteractive  
        Working...
        X