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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    163 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    82 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    184 views
    0 likes
    Last Post CarlTrading  
    Working...
    X