Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Label issue

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

    Strategy Label issue

    Hello,

    I have a variety of automated CL strategies I trade, and one of them is a collection of multiple individual strategies functioning as one -- so it takes unique entries/is run on unique entries, and is labelled as "ClSuperStrategy". This strategy used to work fine -- it would take entries and exits using the different logic entry conditions/exit conditions in the code, so sometimes it may be say 12 contracts long, etc. However for some reason it has stopped working in this fashion, and only takes 1 entry at a time, even when set to unique entries. The problem I've noticed, which I think may explain this, is that when I set up "new strategy" and select "ClSuperStrategy", down in the "General" section of the New Strategy window, where it says Label, it shows the name of a DIFFERENT strategy (which only has one set of logic/entry conditions). I have tried manually editing that to "ClSuperStrategy" and running it, but again it doesn't seem to fix the problem -- it seems like something happened that is causing the new strategy function to use logic from another random Cl algo, rather than the proper SuperStrategy. I only have this problem with this algo, if I pick any of my other Cl algos in the New Strategy window, the Label name will match the strategy name properly. Any ideas on why this may be happening?

    #2
    Hello LightWeight,

    Has the Name property been set in the script?
    If so, what is this set to?

    Try exporting the script that you think the logic is being used from, and then removing it.
    Then try using this first script again.


    To export your script do the following:
    1. Click File -> Utilities -> Export NinjaScript
    2. Enter a unique name for the file in the value for 'File name:'
    3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
    4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>

    Below is a link to the help guide on Exporting NinjaScripts.
    http://www.ninjatrader.com/support/h...nt7/export.htm

    To remove an open source strategy:
    • Click Tools -> Edit NinjaScript -> Strategy...
    • Select the strategy to remove -> click the Delete button
    Last edited by NinjaTrader_ChelseaB; 12-04-2015, 09:12 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      This is the code for the strategy name:

      namespace NinjaTrader.Strategy
      {
      public class ClSuperStrategy : Strategy
      {
      protected override void Initialize()
      {

      But like I said, when I try to set it up the Label section comes up with seemingly another strategy name at random, and then the strategy won't function like it used to.

      I don't quite follow you about exporting the file.



      Originally posted by NinjaTrader_ChelseaB View Post
      Hello LightWeight,

      Has the Name property been set in the script?
      If so, what is this set to?

      Try exporting the script that you think the logic is being used from, and then removing it.
      Then try using this first script again.


      To export your script do the following:
      1. Click File -> Utilities -> Export NinjaScript
      2. Enter a unique name for the file in the value for 'File name:'
      3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
      4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


      By default your exported file will be in the following location:
      • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>

      Below is a link to the help guide on Exporting NinjaScripts.
      http://www.ninjatrader.com/support/h...nt7/export.htm

      To remove an open source strategy:
      • Click Tools -> Edit NinjaScript -> Strategy...
      • Select the strategy to remove -> click the Delete button

      Comment


        #4
        Okay we actually figured out the problem, part of the code refers to the instrument and contract month, and the issue was the code using CL 1-16 as the contract, rather than CL 01-16. Once we switched it to CL 01-16, it began working fine again.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,610 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        21 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X