Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Disabled by Chart Trader Close Button

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

    Strategy Disabled by Chart Trader Close Button

    Can I prevent a strategy from being disabled if I close a position (which was opened by the Buy button) with the Close button?
    If I hit Sell it closes the Long OK.

    #2
    Hello kenz987,

    No that is expected for the close button, in general manual actions are not suggested while working with NinjaScript strategies because it will not be aware of the changes. The close specifically will terminate the script. You can have the strategy create its own buttons which you could then submit a strategy based close with and that would not disable it.

    I look forward to being of further assistance.

    Comment


      #3
      That is a design flaw. I might want to enter orders manually w/ Chart Trader and have a running strategy to Trail a Stop. Or for a quick close just use the Close button. Make it an option. KeepRunning=YES like rejected orders have an option.

      Comment


        #4
        Hello kenz987,

        This is not a flaw, that is how strategies are intended to work.

        I might want to enter orders manually w/ Chart Trader and have a running strategy to Trail a Stop
        This would be the use case for an ATM strategy or for more complex situations the addon framework. A Ninja Script strategy would not be a good candidate for this use.

        Strategies are really intended only for trading in your place without manual interaction. If you want to make a tool that specifically compliments manual trading you could use an Indicator for that purpose with the Addon framework.

        An indicator could observe an account directly and orders submitted to that account, in turn it could do actions based on that information like submitting targets.

        A strategy can also be used in that way by adding custom buttons which submit strategy based orders instead of manual orders keeping it active. Manual closing of positions will interrupt a strategy and it will not observe manual entries to submit targets.


        I look forward to being of further assistance.

        Comment


          #5
          How do I run the Parabolic Trail Stop from an ATM? Thanks, Ken.
          Last edited by kenz987; 04-04-2020, 10:17 AM.

          Comment


            #6
            Hello kenz987,

            The Parabolic stop is part of the NinjaScript managed order handling, this is not available for ATM strategies.





            I look forward to being of further assistance.

            Comment


              #7
              RE: Flaw . . . Since the Close button on ChartTrader is prohibited while running a Strategy, then likewise the Buy Sell etc buttons should be prohibited. Why not gray them out and make it obvious that mixing the two methods is not allowed??? Thank you for the time you spent on this, and the links on how it should be done. Ken

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              22 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              120 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              63 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              45 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X