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

Unconsistent disable of strategy

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

    Unconsistent disable of strategy

    Hello,

    attached a simple multi instrument strategy. The strategy just opens 1 long position MSFT and 1 long position AAPL
    .

    Now when I go to the positions tab in control center and when I manually close the AAPL position the strategy continues to run.

    Whenever I manually close the MSFT position in the positions tab window then the Test2instruments strategy is disabled.

    Why is the strategy disabled at all?

    Why is it only disabled when the primary instruments position is closed?

    This does not make sense to me as in a multi instrument stategy all instruments should be treated equally.

    Please explain the logic behind this behaviour.
    regards
    Andreas
    Start trading with Exness, a leading platform offering low spreads, advanced tools & a wide range of assets. Open your account today!
    Attached Files

    #2
    Hello,

    Thank you for reporting this.

    The expectation would be that the strategy is disabled when you close the position the strategy created. The strategy should only run while you are not manually affecting its orders/position using the tools of the platform.

    Strategies by nature are meant to run by themselves without your interaction. If you want to combine manual trading and automation, you could add extra buttons for those actions which you could add to the chart GUI. https://ninjatrader.com/support/help...ub=usercontrol

    Alternatively, you should instead use the Addon framework which does not have any logic to disable its self. This would be similar to making your own Superdom or another tool which applies logic to orders you submit manually or automatically.


    I will report this to development as I am unsure this would be expected that only the Primary stops the script.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      inconsistent

      Thank you jesse,

      I do not understand the logic you propose: Manual close of position from primary data series will disable the strategy.
      Manual close of a position of a secondary data series does nothing!

      I would expect or close in both cases or do not close at all .

      Is there a way to disable this behaviour? If you just give me a hint then I will find out myself.

      It is all about my SpreadTrader where I want to handle cases when a position is closed externally, or by user or by margin violation or similar
      Start trading with Exness, a leading platform offering low spreads, advanced tools & a wide range of assets. Open your account today!


      regards
      Andreas

      Comment


        #4
        Hello,

        There is not a way to disable this behavior, as I had noted I will be reporting this to development as it is not expected.

        I would suggest reviewing the Addon section I had linked in post #2 in case you want to perform more complex actions in addition to automation. Strategies by nature should disable if you manually close the position so they not likely a good choice if you have something external also modifying orders or positions. In case the user has exceeded margin or a broker related external close is seen, the strategy should also disable to allow the user to react. An addon could be used to bypass the disable feature of a strategy as you would be working directly with the account, add-ons do not have the same rules as a strategy would.



        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Can I do priceseries calculations from an AddOn? Rethoric question, you cannot.

          To handle something like this

          double smoothed=s.SMA(spreadpriceseries.SpreadValue,3)[0];

          I need the priceseries logic.

          Good luck

          If I find an easy hack to disable the strategy disable I will post it here. Was hoping for a hint to save time

          Andreas

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by guillembm, Yesterday, 11:25 AM
          2 responses
          9 views
          0 likes
          Last Post guillembm  
          Started by junkone, 04-21-2024, 07:17 AM
          9 responses
          68 views
          0 likes
          Last Post jeronymite  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          4 responses
          18 views
          0 likes
          Last Post trilliantrader  
          Started by mgco4you, Yesterday, 09:46 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by wzgy0920, Yesterday, 09:53 PM
          0 responses
          10 views
          0 likes
          Last Post wzgy0920  
          Working...
          X