• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
    https://pastebin.com/unTYEi7y

    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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        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:

          https://ninjatrader.com/support/help...ease_notes.htm

          Please let me know if I can assist further.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pecunianonolet, 11-28-2016, 03:34 AM
          4 responses
          3,135 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by contrax, Today, 08:20 AM
          2 responses
          12 views
          0 likes
          Last Post contrax
          by contrax
           
          Started by brownsfan019, Today, 07:54 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by Amitabha, Today, 04:50 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Marco  
          Started by JulieG, Today, 12:40 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChrisSch  
          Working...
          X