Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Nt8b11 Issue with properties in optimization

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

    Nt8b11 Issue with properties in optimization

    Hi,
    It seems that the strategy analyzer has a "memory" of which variable names I used when I first started working with it.

    If I add a property to my strategy the optimizer doesn't add the option to iterate over the new variable.

    For example, I have "Contracts" and "Reversal" properties which are iterable and and I add a new one "TrailingStop" and there is no option to iterate over it. I tried changing the name or adding other properties but the only ones that I can use are the first 2.

    I tried restarting the strategy analyzer and it didn't help.

    The Properties code:
    Code:
    		[Range(1, int.MaxValue)]
    		[NinjaScriptProperty]
    		[Display(ResourceType = typeof(Custom.Resource), Name="Contracts", Description="Amount of contracts", Order=1, GroupName="NinjaScriptStrategyParameters")]
    		public int Contracts
    		{ get; set; }
    		
    		[Range(1, int.MaxValue)]
    		[NinjaScriptProperty]
    		[Display(ResourceType = typeof(Custom.Resource), Name="TrailingStop", Description="Kagi reverse after x ticks", Order=2, GroupName="NinjaScriptStrategyParameters")]
    		public int TrailingStopTicks
    		{ get; set; }
    		
    		[Range(0, int.MaxValue)]
    		[NinjaScriptProperty]
    		[Display(ResourceType = typeof(Custom.Resource), Name="Reversal", Description="Trailing Stop Ticks", Order=3, GroupName="NinjaScriptStrategyParameters")]
    		public int RevTicks
    		{ get; set; }
    Attached Files

    #2
    Hello ToMer_K,

    Thank you for writing in.

    Can you please provide the strategy that is displaying this behavior so I may test for this behavior on my end?

    To export your script do the following:

    1. From the Control Center window select the menu Tools > Export > NinjaScript... to open the "Export NinjaScript" dialog window

    2. Press "add"

    3. Use the "Type" drop down to filter available NinjaScript types

    4. Select all of the files that you want to export and press the "OK" button

    5. A list of all files that will be exported will be shown

    6. Press the "Export" button to export the selected files

    7. A NinjaScript Archive File (.zip) file will be created in My Documents\<NinjaTrader Folder>\bin\Custom\ExportNinjaScript. You can press ".." and change the export directory if you wish

    Once exported, please attach the file as an attachment to your reply.

    Below is a link to the help guide on Exporting NinjaScripts:
    https://ninjatrader.com/support/help...us/?export.htm

    If you would rather not provide your strategy on the support forum, please email the exported zip to platformsupport [AT] ninjatrader [DOT] com with both my name and a link to this thread referenced.

    I look forward to receiving the export.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Cimhripljwe, Today, 10:18 PM
    0 responses
    2 views
    0 likes
    Last Post Cimhripljwe  
    Started by TimothyDavis, Today, 09:37 PM
    0 responses
    3 views
    0 likes
    Last Post TimothyDavis  
    Started by cetrtrew, Today, 09:35 PM
    0 responses
    1 view
    0 likes
    Last Post cetrtrew  
    Started by smcllr, Today, 04:15 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by rtwave, Today, 02:33 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X