Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart template does not load an indicator parameter.

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

    Chart template does not load an indicator parameter.

    Dear Ninjatrader Team,

    I faced with the following problem:
    I created an indicator that has a couple of parameters including an instrument selector.
    Parameters are like:

    Szamla_nev = "Sim101";
    CustomEnumNamespace.Kockazat KockazatTipus = CustomEnumNamespace.Kockazat.Szazalek;
    Risk = 1;
    InstrumentInput = Instrument.GetInstrument("");
    ATR1 = 1.5;
    ATR2 = 2.0;
    ATR3 = 3.0;
    ATRPeriod = 14;
    PrintText = false;
    SzovegSzin = Brushes.Black;
    CustomEnumNamespace.SzovegPos SzovegElhelyezes = CustomEnumNamespace.SzovegPos.JobbAlso;
    SzovegEltolas = 0;​

    if (InstrumentInput == null) InstrumentInput = Instrument;

    I set up on the chart with my custom default and saved it successfully. (It is loaded fine later.)

    But when I save it within a chart template I see the default values, but when I try to load the chart template on another chart, then the InstrumentInput parameter is not handed over.

    Chart template looks like this:

    <Indicator BarsIndex="0" Instrument="ES SEP24 Globex" Name="NinjaTrader.NinjaScript.Indicators.ProfitPos itionSize" Panel="-1" DisplayName="ProfitPositionSize(1,5,2,3,14,MNQ SEP24 Globex,Szazalek,False,0,4,APEX-215824-02,BalAlso,0,#FF000000)">

    It's clearly visible, that the parameter value is missing (was not handed over from chart template) from the parameter list.

    Click image for larger version

Name:	image.png
Views:	75
Size:	21.7 KB
ID:	1314878

    Can you please help?

    Thanks,
    Jorgi​​
    Attached Files

    #2
    Hello Jorgi,

    There needs to a be a string serialized for the property and the string needs to be converted back to an Instrument object.

    The forum post below has sample code.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Jorgi,

      There needs to a be a string serialized for the property and the string needs to be converted back to an Instrument object.

      The forum post below has sample code.
      https://forum.ninjatrader.com/forum/...96#post1171896
      thread was helpful, thank you

      Comment


        #4
        Originally posted by NinjaTrader_ChelseaB View Post
        Hello Jorgi,

        There needs to a be a string serialized for the property and the string needs to be converted back to an Instrument object.

        The forum post below has sample code.
        https://forum.ninjatrader.com/forum/...96#post1171896
        Thanks a lot for your support!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        601 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        347 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
        559 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        558 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X