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:


    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 FrancisMorro, Today, 03:24 AM
    0 responses
    1 view
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,770 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    944 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    11 views
    0 likes
    Last Post Max238
    by Max238
     
    Working...
    X