Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with backtesting - Initialize() called twice (!)

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

    Problem with backtesting - Initialize() called twice (!)

    1st problem - Initialized called twice (output window show that while other strategies works fine)
    2nd problem - backtesting are limited with 50-60 days while other strategies works fine

    TraceOrders=true and there is any problem detected!
    Attached Files
    Last edited by wtblinblya; 12-07-2012, 05:54 AM.

    #2
    Hello wtblinblya,
    Welcome to the forum and I am happy to assist you.

    The Initialize section can be called multiple times. We suggest using the OnStartUp methods if you want to calculate anything etc during the start of the code. Please refer to our help guide to know more about OnStartUp



    If I try backtesting the strategy on a 15 minute ES chart from 1st January 2012 then I am not able to get any results. Please make sure the conditions are called true for the Entry orders.

    Also you are using the Set() methods and the Exit() method in the same code.

    The managed approach will filter out the Exit codes as per the Internal order handling rules. Please refer to our help guide to know more about it
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Joydeep View Post
      Hello wtblinblya,

      Also you are using the Set() methods and the Exit() method in the same code.

      The managed approach will filter out the Exit codes as per the Internal order handling rules. Please refer to our help guide to know more about it
      http://www.ninjatrader.com/support/h...d_approach.htm
      I can't find at manual why I can't use the Set() methods and the Exit() method in the same code. Please give me the link

      Comment


        #4
        Hello wtblinblya,
        Please refer to the section "Internal Order Handling Rules that Reduce Unwanted Positions" from our help guide to know more about it.


        Methods that generate orders to exit a position will be ignored if:
        • A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
        • A position is open and an order submitted by a set method (SetStopLoss() for example) is active
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Kaledus, Today, 01:29 PM
        5 responses
        12 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Waxavi, Today, 02:00 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        5 responses
        23 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by PhillT, Today, 02:16 PM
        2 responses
        7 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X