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

Market Analyzer broken after saving Workspace

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

    Market Analyzer broken after saving Workspace

    Hi,
    i have written a Market Analyzer column which works fine - until the workspace is saved. After that the Market Analyzer cannot be edited, giving the error visible in the screenshot below. If Ninja is restarted, the Market Analyzer is blank/empty.
    I know that when an indicator has an xml issue, saving the workspace will create a log error message, however in this case no error appears in the log tab when saving.
    I've triple-checked the public Properties and all seems fine. I'm baffled. Assistance will be appreciated.

    Cheers,
    saltminer

    Click image for larger version

Name:	Capture.PNG
Views:	18
Size:	36.1 KB
ID:	1179616

    #2
    UPDATE:
    I've tracked the problem to this Property, but I don't know what's wrong with it. It compiles, it produces results. It just won't save in the Workspace without killing the Market Analyzer. (silently)


    [NinjaScriptProperty]
    [Display(ResourceType = typeof(Custom.Resource), Name="SMAXCON Fast MA Type", Order=922, GroupName="PriceExpansion")]
    public NinjaTrader.SMAXCONSpace.MovAvgType PriceExpansion_FastMAType
    { get; set; }


    This is in an indicator, where it is declared like this:


    namespace NinjaTrader.SMAXCONSpace
    {
    public enum MovAvgType
    {
    SMA,
    EMA
    }
    }

    #region NinjaScript generated code. Neither change nor remove.
    .... etc

    Comment


      #3
      Hello saltminer,

      That may relate to where the enum is defined in the script. As an example indicators need to define the enum in a specific location in contrast to the indicator class, that may also hold true for analyzer columns. You could first try moving the enum to a similar structure as shown in the following sample in the link. Its also possible that the error comes if you are not setting a default value for that property from State.SetDefaults.

      If that does not work you may need to use a secondary serialization property here.

      https://ninjatrader.com/support/help...ned_parame.htm


      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by johnMoss, Today, 10:12 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by thaison316, 03-29-2021, 03:12 PM
      4 responses
      52 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by WHICKED, Today, 09:51 AM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by simple_goodoboy, Today, 09:15 AM
      1 response
      21 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by debleded, Today, 09:10 AM
      1 response
      25 views
      0 likes
      Last Post NinjaTrader_Kate  
      Working...
      X