Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM with Multi-Instrument

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

    ATM with Multi-Instrument

    I want to call AtmStrategyCreate() for barseries=0, when BarsInProgress != 0.

    In general, is there a way to specify which instrument will be managed by the ATM.

    #2
    srvsrv,

    AtmStrategyCreate() will just create the order as whichever instrument the OnBarUpdate() is currently processing. So if BarsInProgress == 1 and that happened to be MSFT, it would trade MSFT. If it were BarsInProgress == 0 and that was AAPL, then it would trade AAPL.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,
      Thanks for the quick reply.

      Can you reccomend a reliable way to signal:
      FROM OnBarUpdate(), when BarsInProgress = x;
      TO OnBarUpdate(), when BarsInProgress = y?
      The signal triggers a call to AtmStrategyCreate() with known parameters.

      A shared variable (semiphore?) might work but I'm concerned about unanticipated sync. problems in a multi-threaded environment, which I have little experience with.

      The strategy I'm working on works calls (for example) EnterLong() as the BarSeries can be specified. I was surprised to learn it is not supported in the ATM API.

      Thanks.

      Comment


        #4
        In BIP=x, set bool to true. In BIP=y, check bool. If it is true, trade. Once trade sent, bool set to false.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,
          Thanks for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          656 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          371 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          579 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X