Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

<unknonw> showing up in indicator properties

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

    <unknonw> showing up in indicator properties

    Version NT7 0.0.20

    I have a modified indicator...that seems to work, but gives unusual looking verbiage in the indicator properties box when I call it up....
    (see attached screen grab)

    Instead of providing visual confirmation of the usual parameter settings....it shows the following:

    PASwh2 (6E 09-10(1min),<unknown>,<unknown>,<unknown>

    The "unknown" fields should contain the default settings for those parameters

    The actual parameter settings seem to be valid and working, but I can't figure out why I get the <unknown> .

    Below is the properties for this code.....

    #region Properties
    [Description("Deviation in percent or points regarding on the deviation type")]
    [GridCategory("Parameters")]
    [Gui.Design.DisplayName("Deviation value")]
    public double DeviationValue
    {
    get { return deviationValue; }
    set { deviationValue = Math.Max(0.0, value); }
    }

    [Description("Type of the deviation value")]
    [GridCategory("Parameters")]
    [Gui.Design.DisplayName("Deviation type")]
    public DeviationType DeviationType
    {
    get { return deviationType; }
    set { deviationType = value; }
    }

    [Description("True = Use high and low instead of selected price type.")]
    [GridCategory("Parameters")]
    [Gui.Design.DisplayName("Use high and low")]
    public bool UseHighLow
    {
    get { return useHighLow; }
    set { useHighLow = value; }
    }

    ================================================== =======
    Variables settings:
    #region Variables
    private DeviationType deviationType = DeviationType.Points;
    private double deviationValue = 0.0005;
    private bool useHighLow = true;


    Not sure what is wrong....any advice is most appreciated...
    Attached Files

    #2
    found the problem....

    After some trial-and-error....I figured out the problem.

    I had the following code in .....

    protected override void Initialize()
    {
    ( other initialize code......)

    if (ChartControl.BackColor == Color.Black)
    targetBorder = Color.White;
    else
    targetBorder = Color.Black;

    -----------------------------------------------------------------------------
    Ninja apparently doesn't like the ChartControl code in Initialize....
    because as soon as I removed it....everything went back to normal.

    Thanks.............

    Comment


      #3
      Great, photog. Yes, that could certainly cause potential issues. Thanks for the tip and sharing your solution here.
      Ryan M.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DayTradingDEMON, Today, 09:28 AM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Stanfillirenfro, Today, 07:23 AM
      9 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by George21, Today, 10:07 AM
      0 responses
      8 views
      0 likes
      Last Post George21  
      Started by navyguy06, Today, 09:28 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      8 responses
      33 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X