Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about AtmStrategyCreate

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

    Question about AtmStrategyCreate

    Hello,

    I'm developing a strategy that uses multi-time frames and multi-data series.

    I know that you can reference the barsInProgressIndex when submitting an order. As seen below:
    Code:
    EnterLong(int barsInProgressIndex, int quantity, string signalName)
    Are you able to reference barsInProgress index when submitting an order using AtmStrategyCreate()? I don't see it on the reference page.
    ​​​​​​​
    Code:
    AtmStrategyCreate(OrderAction action, OrderType orderType, double limitPrice, double stopPrice, TimeInForce timeInForce, string orderId, string strategyTemplateName, string atmStrategyId, Action<Cbi.ErrorCode, string> callback)
    Any help would be appreciated.

    Thank you!

    #2
    Hello devatechnologies,

    Thank you for your post.

    There is no barsInProgress parameter, however, you can use a BarsInProgress condition to submit the orders to an additional bars object.





    I tested this by making a copy of SampleAtmStrategy, adding an additional series in the strategy, and then putting the existing code in a BarsInProgress condition.

    Code:
    //value of 1 represents the additional series added in State.Configure 
    if (BarsInProgress == 1)
    {
    //logic for submitting and handling atm goes here
    }
    Please let us know if you have any further questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    47 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X