Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add a way to enable/disable Conditions & Actions in the Strategy Builder

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

    Add a way to enable/disable Conditions & Actions in the Strategy Builder

    Hi there,

    I am creating a Strategy and I have a heap of conditions in there that I have taken a bit of time to build up, and an action that draws an arrow, but no arrows are currently being drawn.
    To debug this, it would be awesome if I had the ability to just disable a heap of conditions and them bring them back in one at a time and see which one was causing the problem. As it is, the only thing I can do is remove the conditions. So now I have to document them all so I can re-add them one at a time, in order to identify the condition(s) that is preventing my strategy from executing the actions, and this will add a heap of time onto my Strategy development and debugging, both documenting and re-adding the conditions. Having the option in the grid that lists the conditions to just tick or untick a check box to enable/disable that group or condition would be such a time saver.
    It would also be great if I could enable/disable actions as well. Then I could have some logging in there that I could turn off when not using it, but turn on when I need it to trouble shoot.

    I think this would add a heap of value to the Strategy Builder and everyone that uses it!!

    Also, how about adding the copy/past functionality to the condition group dialogue, and of course enable/disable to conditions in the groups as well.
    It would make the Strategy Builder so much more efficient to use, and give the product a real edge.

    Regards,

    codeOwl.


    #2
    I use bools for the stuff that I want to enable / disable temporarily, like prints on some sections of my code.
    That gives me a check-box on the strategy start screen that I can enable / disable before i activate the script

    Code:
    protected override void OnStateChange()
            {
                #region Set Defaults
    
                if (State == State.SetDefaults)
                {
    PrintStart                = true;
    }
    ...
    
    protected override void OnBarUpdate()
            {                      
                // Make sure this strategy does not execute against historical data
                if (State == State.Historical)
                    return;
    
                int LowestBarIndex = Math.Max(DmiPeriod, LookbackPeriod);
    
                if (!strategyStart)
                {
                    if(PrintStart)
                    {
                        if (BarsInProgress == 0)
                        Print ("Strategy start 1 min bar: " + CurrentBar + " - " + Time[0]);
    
                        if (BarsInProgress == 2)
                        {
                            Print ("Strategy start 5 min bar: " + CurrentBar + " - " + Time[0]);        
                            strategyStart = true;
                        }                    
                    }
                }    
    #region Properties        
    [NinjaScriptProperty]
            [Display(Name = "Print Start", Order=7, GroupName="Parameters")]
            public bool PrintStart
            { get; set; }

    Comment


      #3
      Hi codeOwl, thanks for your suggestions. I'll submit a feature request to add the ability to disable conditions and also the ability to copy/paste conditions.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        itrader46,

        Thanks for the response. That is a great idea for "Unlocked" Strategies, or hand coded Strategies, but does not help much with Strategies built and maintained with the Strategy Builder.

        NinjaTrader_ChrisL,
        Thanks for the response. To clarify, you can already copy paste conditions, just not within condition groups. But of course being able to enable / disable conditions, condition groups and actions is the main request here.

        Comment


          #5
          Yes, that's right, it is only suited for hand coding, but given how awkward modifying a script with the builder, it's not worth bothering for me.
          What I do is get the script into a starting form, then copy the code and do most of the changes a lot easier by hand, comment out parts of it that I want to temporarily disable, etc.
          Then I just get back into the builder script if I needed to quickly add stuff that I don't know how to do by hand.
          In my experience, this saves a huge amount of time and I learned a lot more about coding as well this way.

          Comment


            #6
            Hi codeowl, noted. I will post a feature tracking ID shortly.

            Thanks in advance for your patience.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            1 view
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,770 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            944 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            11 views
            0 likes
            Last Post Max238
            by Max238
             
            Working...
            X