• 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 builder bug

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

    Strategy builder bug

    On the latest build, and I''ve had this in quite a few different scenarios the last few days, if you create a strategy using something like the below, the strategy builder cannot process it. It always says it cannot save it due to an XML error.

    Code example below, as output by the strategy builder.

    Code will compile and run in the editor fine, which is OK, if you no longer want to use the builder...

    Code:
    			if (BarsInProgress != 0) 
    				return;
    
    			if (CurrentBars[0] < 3)
    			return;
    
    			 // Set 1
    			if ((Close[2] > DonchianChannel1.Mean[0])
    				 && (Close[1] < DonchianChannel1.Mean[0])
    				 && (Close[3] < DonchianChannel1.Mean[0]))
    			{
    				EnterLong(Convert.ToInt32(2), "");
    				ExitLongLimit(Convert.ToInt32(1), (DonchianChannel1.Upper[0] + (-4 * TickSize)) , @"", "");
    				ExitLongLimit(Convert.ToInt32(1), (Position.AveragePrice + (3 * TickSize)) , "", "");
    			}

    #2
    Hello PJSmith,

    Thank you for your note.

    After you’ve created this strategy in the strategy builder, are you unlocking the strategy? Or are you getting this issue from these inputs in the strategy builder?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      The strategy was entirely in the strategy builder at the time the error occurs. I only unlocked the strategy afterwards as the strategy builder could not save the built strategy. This at least enabled me to see the code, make any changes I needed in the editor, and share the code here.

      I've actually had this a few times on different days/strategies I've tried to build. I think it may be related to positive or negative offsets in targets, but that's a guess. If you unlock the code, it'll compile and run fine in the editor, so I guess it's just the strategy building struggling to parse/save the xml.

      Comment


        #4
        Hello pjsmith,

        I set up the strategy with the information you provided and was unable to replicate.

        Can you confirm the screen shot of the attached should result in the error?

        I look forward to your reply.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Johnny Santiago, Today, 12:30 PM
        7 responses
        22 views
        0 likes
        Last Post Johnny Santiago  
        Started by ttodua, Today, 12:26 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by dastaan, 06-26-2020, 04:33 AM
        6 responses
        108 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by RumHam, Today, 12:14 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by Lancer, Today, 12:12 PM
        2 responses
        13 views
        0 likes
        Last Post Lancer
        by Lancer
         
        Working...
        X