Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sync Chart-Trader's trade into strategy

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

    Sync Chart-Trader's trade into strategy

    i know the Start-Behavrior. I have:
    doptAccountPositionAware = true;
    StartBehavior = StartBehavior.AdoptAccountPosition;

    However, probably tha tis not relevant to this problem: i want a live-syncrhonization of Chart-Trader executions into strategy .

    For example, BOTH strategy is flat and Account is flat. My Strategy creates entries (with EnterLong), and then I use ChartTrader to exit.

    EnterLong() commands are are visible on chart, and it's executions are reflected into ChartTrader (i.e. CT can exit Strategy triggered orders).

    However, once i exit strategy-created entry, then strategy is unable to re-enter with EnterLong command (I use if(PositionAccount.MarketPosition == Mktp.Flat) EnterLong() ).

    So, the problem is that, when strategy fired an ENTRY order(and closed by ChartTrader), then it still sees strategy's internal position as "LONG" (even thought i manually reset `Position` property and successfully re-execute the EnterLong command, it no longer executes the order, it even doesnt reach to OnOderUpdate event)

    here is my code:
    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


    I tried another attempt (for that, check the "try_auto_change_order" chechbox), but that creates a double orders...

    will this help?: https://ninjatrader.com/support/help...ount_class.htm or this https://ninjatrader.com/support/foru...786#post437322



    need your help. thanks

    #2
    Hello TazoTodua,

    Thank you for the post.

    The only way that you could re-sync your strategy is by pressing "F5" to reload the NinjaScript objects on your chart. The entry is not occurring because your Strategy position is still not flat and your EntriesPerDirecton is likely = 1 (by default). After you have manually closed the position, and after you reload the NinjaScript, the strategy position will adopt the account position and will make its trades normally.

    Please let me know if I can assist further.

    Comment


      #3
      ouh, F5 method is highly non-solution to this problem...
      i am sure, that our golden NT should had a workaround for this.
      please, send that as request to Devs.

      I think, there should be a property in strategy, like:

      SynchronizeLiveAccountTradesFromChart = true/false

      Comment


        #4
        Hello TazoTodua,

        Thank you for the reply.

        I will submit a request to have this feature added in a future update. I will update this thread with a feature tracking ID shortly.

        Thanks in advance for your patience.

        Comment


          #5
          Hello TazoTodua,

          Thanks for your patience.

          I have the feature tracking ID for the requested feature.

          SFT-3471

          Please check the release notes upon each release to track added features:



          Please let me know if I can assist further.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          64 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          139 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X