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

Names of indicators are empty

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

  • NinjaTrader_ChelseaB
    replied
    Hello nothingbutprofits,

    Yes, in State.SetDefaults you can set the Name property. However, I recommend that the name match the classname and the filename to prevent confusion.

    Leave a comment:


  • nothingbutprofits
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello LeonK,

    The Name property can be changed with the Label parameter in the Indicators or Strategy window in the scripts parameters.

    Are you finding that this Name property is not matching what is showing for this input in the parameters window?
    Is it possible to rename Name label directly from Strategy?

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello LeonK,

    The Name property can be changed with the Label parameter in the Indicators or Strategy window in the scripts parameters.

    Are you finding that this Name property is not matching what is showing for this input in the parameters window?

    Leave a comment:


  • LeonK
    replied
    -=Edge=- Thank you. I probably wound not resolve it without your suggestions.

    @NinjaTrader_ChelseaB Instead of using .Name that is empty in many cases I used .GetType(() and it works just fine. Problem solved.

    It looks to me like there is a bug somewhere in NinjaTrader8 in regards to the .Name.

    Leave a comment:


  • -=Edge=-
    replied
    Originally posted by LeonK View Post
    As you can see all indicators are accessible from the code but only three out of 10 show their names.
    Blanking out an indicator's label property has caused me grief from the beginning..
    Although the type name does not necessarily have to match the indy name.. could try:

    Code:
    Print(indicator.GetType().ToString().Replace("NinjaTrader.NinjaScript.Indicators.", String.Empty));
    Might be able to save you some time, or possibly even give you some additional ideas here..

    https://youtu.be/mcs1jyk5ejg?t=206


    Be Safe!

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello LeonK,

    If you create a new indicator from the NinjaScript Editor and don't modify the code, is the new indicator affected?

    It may be the undocumented object type does not support the properties you want from it.

    Is it an issue with the cast to IndicatorRenderBase and not as an Indicator?

    I've often used another undocumented code to list the indicators.
    Type[] availableIndicatorTypes = NinjaTrader.Core.Globals.AssemblyRegistry.GetDeriv edTypes(typeof(IndicatorBase));

    Leave a comment:


  • LeonK
    replied
    if all indicator names, especially the system indicators included with NinjaTrader, are not showing I think its an install problem.
    Hi Chelsea,

    trying the system indicators was a very good idea! So here is an update: most system indicators' names are shown, but NONE of the vendors indicators, not just mine(!), are shown.

    Here is a link to the screen shot of the Indicators page: https://app.box.com/s/diz2vbvpbybuzqu2db93nsr7iafoqzcf

    The following indicators have been configured:

    DrawingToolTile

    ncatOpeningTick
    ncatOpeningTick
    Bar Status by ninZa.co
    NetChangeDispaly

    aomSDZones
    aomManulStrategy

    ADX
    ATR
    APZ

    Here is the printout:

    Found Indicator
    Found Indicator
    Found Indicator
    Found Indicator
    Found Indicator
    Found Indicator
    Found Indicator
    Found Indicator ADX
    Found Indicator ATR
    Found Indicator APZ

    As you can see all indicators are accessible from the code but only three out of 10 show their names. aomSDZones and aomManualStartegy are my code, the first one and the last three are "system" indicators and the rest are from other vendors.

    Thanks




    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello,

    Are the 'names of all indictors'.. empty?

    If its just this one its probably an issue with the code of that one indicator.

    But if all indicator names, especially the system indicators included with NinjaTrader, are not showing I think its an install problem.

    Do the indicators show in the Indicators window?

    Leave a comment:


  • LeonK
    replied

    Hi Chelsea

    yes. I've tried both repair and fresh install on the second machine with the same result - all my indicators work except for this one that relies on indicators names. The names remain empty.

    Thanks

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello LeonK,

    Did you rename the Documents\NinjaTrader 8 folder before running the repair?

    Leave a comment:


  • LeonK
    replied
    Hello, Chelsea,

    1. I have upgraded NT8 to the newest version. Still, SW can not find an indicator name.
    2. I did repair SW installation. Same result, can not find an indicator name.


    Thank you

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello LeonK,

    Just a heads up NinjaTrader.Gui.NinjaScript.IndicatorRenderBase is not documented.

    That said, if you change the name of the Documents\NinjaTrader 8 folder and run the repair from the 8.0.24.3 installer to regenerate a clean environment folder, is the behavior the same?

    Leave a comment:


  • bltdavid
    replied
    Is the NinjaTrader 8 version the same on both machines?

    Go to Control Center -> Help -> About

    Same version number on both machines?

    Leave a comment:


  • LeonK
    started a topic Names of indicators are empty

    Names of indicators are empty

    Here are two pieces of code that work as expected on my computer

    1. Find rectangles drawn by aomSDZones indicator

    foreach (DrawingTool draw in DrawObjects.ToList())
    {
    if (draw is DrawingTools.Rectangle)
    {
    DrawingTools.Rectangle Rect = draw as DrawingTools.Rectangle;

    if (Rect.DrawnBy != null)
    {
    if (Rect.DrawnBy.Name.Equals("aomSDZones"))
    Print("Rectangle " + Rect.Tag + " is drawn by aomSDZones");
    else
    Print("Rectangle " + Rect.Tag + " is drawn by " + Rect.DrawnBy.Name);
    }
    else
    Print("Rectangle " + Rect.Tag + " drawn manually");
    }
    }

    2. Print names of indicators configured on the chart

    if (ChartControl != null)
    {
    ChartObjectCollection<NinjaTrader.Gui.NinjaScript. IndicatorRenderBase> indicatorCollection;
    foreach (NinjaTrader.Gui.NinjaScript.IndicatorRenderBase indicator in indicatorCollection)
    {
    Print ("Found Indicator " + indicator.Name);
    if (indicator.Name.Equals("aomSDZones"))
    {
    Print (Name + ": * * * Found our aomSDZones indicator* * * ");
    }
    }
    }

    However, on another computer names of all indictors are empty. I mean Rect.DrawnBy.Name from the 1st piece and indicator.Name in the 2d.

    What can cause such effect? Exactly the same source code is being compiled on both computers.

Latest Posts

Collapse

Topics Statistics Last Post
Started by sgordet, Today, 05:45 AM
1 response
2 views
0 likes
Last Post NinjaTrader_Jason  
Started by 05arminia, Today, 12:03 AM
5 responses
31 views
0 likes
Last Post NinjaTrader_Jason  
Started by MakesTrades23, Yesterday, 10:39 PM
1 response
32 views
0 likes
Last Post NinjaTrader_Jason  
Started by Emmarq25, Yesterday, 11:01 PM
2 responses
43 views
0 likes
Last Post NinjaTrader_ChrisSch  
Started by Johnny, Yesterday, 01:11 PM
7 responses
76 views
1 like
Last Post brucerobinson  
Working...
X