Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot save Chart Template

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

    Cannot save Chart Template

    I'm cloning the Trade Copiers found on the Ninja Ecosystem....and customizing them them.....it works well...but I'm unable to save a Template with the indicator...it tells me that

    I get an error when saving the Template: "Object Reference not set to an instance of an object" for any account in the parameter list that has no selected account

    No problem with compilation or execution

    not sure how to solve it...here is what these parms look like

    [NinjaScriptProperty]//[XmlIgnore]
    [Display(Name="Copy from this Account ", Order=1, GroupName="1. Replicate ChartTrader")]
    [TypeConverter(typeof(NinjaTrader.NinjaScript.Accou ntNameConverter))]
    public string p_MasterAccount_Name { get; set; }

    [NinjaScriptProperty]//[XmlIgnore]
    [Display(Name="To Account 1", Order=2, GroupName="1. Replicate ChartTrader")]
    [TypeConverter(typeof(NinjaTrader.NinjaScript.Accou ntNameConverter))]
    public string p_AccountName_01 { get; set; }

    [NinjaScriptProperty]//[XmlIgnore]
    [Display(Name="To Account 2", Order=3, GroupName="1. Replicate ChartTrader")]
    [TypeConverter(typeof(NinjaTrader.NinjaScript.Accou ntNameConverter))]
    public string p_AccountName_02 { get; set; }​


    ????

    #2
    Hello llanqui,

    The 3 properties you have shown are account name converters, you need to set a default for each in State.SetDefaults. Did you do that? You can set them to Sim101 for a default selection.

    Comment


      #3
      well, they should not be set to a default account...because the trade copier will copy the master to them then by default...they need to default to null....

      Comment


        #4
        Hello llanqui,

        By adding only those properties that won't set a default account and will cause errors, did you specifically add code in State.SetDefaults to set default account names to those strings? If the string is null that can cause errors.

        Comment


          #5
          well, I will create an extra SIM account called SIM-NULL and then use that as a null account entry, and not allow any copy trades to it

          this particular code (from your Ecosystem) has nine "copy to" accounts

          and I have heard of other traders using up to 20 trade copy accounts...so there must be some way to have a null account in this list of target accounts

          don't know how Replintko handles this

          but my work around should do what I need

          thanks

          Comment


            #6
            Hello llanqui,

            You dont need to create extra accounts you need to assign a value to each of those strings in your code.

            For example

            if(State == State.SetDefaults)
            {
            p_AccountName_02 = "Sim101";
            }

            Did you do this?

            Comment


              #7
              that won't work because the trade copier will submit orders to all non-null accounts in the parameter list

              Comment


                #8
                Hello llanqui,

                All that I can suggest is setting a default like Sim101 so there is at least some selection is made to avoid the error, you still will have to select the proper accounts when you apply the script. When you select accounts and save a template it should be able to save at that point.

                Comment


                  #9
                  a SIM-NULL account will fix this and I'll have the trade copier ignore it as a copy target

                  Comment


                    #10
                    well, to be more clear...I don't want extra orders to go to SIM-101 just because of this issue...

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    598 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    343 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    103 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    556 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    555 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X