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

Strategy Properties

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

    Strategy Properties

    There is property in strategy that doesn't show settings when enum is set to "Disabled" but it shows that properties when "Entrys" (see pic). Can you explain how this works? I'm trying to use this idea in my own strategy.
    Code:

    Code:
    //
    #region EMA_Cross
    [Description("Allow Entrys/Exits on Fast/Slow EMA crossings ")]
    [GridCategory("*EMA Crossings Control")][RefreshProperties(RefreshProperties.All)] [Gui.Design.DisplayNameAttribute("*Enable Control")]
    public EmaCrosses EmaCross { get { return emaCross; } set { emaCross = value; } }
    //
    [Description("Allow Entrys/Exits if price Above/Below EMA Slow plot ")]
    [GridCategory("*EMA Crossings Control")][RefreshProperties(RefreshProperties.All)] [Gui.Design.DisplayNameAttribute("*Enable Limits")]
    public EmaLimits EmaLimit { get { return emaLimit; } set { emaLimit = value; } }
    //
    [Description("Fast EMA Period Signal Line")]
    [GridCategory("*EMA Crossings Control")]
    public int EmaFast { get { return emaFast; } set { emaFast = value; } }
    //
    [Description("Slow EMA Period Signal line")]
    [GridCategory("*EMA Crossings Control")]
    public int EmaSlow { get { return emaSlow; } set { emaSlow = value; } }
    //
    #endregion
    Attached Files

    #2
    hello Leeroy_Jenkins,

    You can find an example of using a type converter to control properties in the following link. You would need to design a type converter that works with the properties to hide or show them based on another value. I am not aware of a specific sample of doing that which sets it to disabled for NT7 but you could hide the properties.


    https://ninjatrader.com/support/foru...721#post686721

    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 12-14-2020, 12:15 PM.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    7 views
    0 likes
    Last Post PaulMohn  
    Started by ZenCortexAuCost, Today, 04:24 AM
    0 responses
    6 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by ZenCortexAuCost, Today, 04:22 AM
    0 responses
    3 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by SantoshXX, Today, 03:09 AM
    0 responses
    16 views
    0 likes
    Last Post SantoshXX  
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    5 views
    0 likes
    Last Post DanielTynera  
    Working...
    X