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 Noerclou, Today, 04:55 AM
      0 responses
      1 view
      0 likes
      Last Post Noerclou  
      Started by llanqui, Yesterday, 09:59 AM
      2 responses
      16 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by ThoriSten, Today, 03:56 AM
      0 responses
      6 views
      0 likes
      Last Post ThoriSten  
      Started by PhillT, 04-19-2024, 02:16 PM
      3 responses
      20 views
      0 likes
      Last Post mangel2000  
      Started by TraderBCL, Today, 02:37 AM
      0 responses
      4 views
      0 likes
      Last Post TraderBCL  
      Working...
      X