Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating ATM Strategy in NinjaScript against a dynamic account

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

    Creating ATM Strategy in NinjaScript against a dynamic account

    Hi,

    I have written an "account protection strategy" which allows me to submit orders via custom buttons and which runs a range of checks against the orders placed. If the checks fail no order is submitted. If the check is successful an ATM Strategy is created based on the selected ATMStrategy.

    Now in case the checks fail: Instead of not submitting the order, I'd like to go ahead and "redirect" the order to be placed on the Sim101 account. Is this possible?
    Essentially I am looking for:

    Account a = chartTraderAccountSelector.GetAccount("Sim101")
    a.AtmStrategyCreate(....)

    How would I be able to implement this?
    This is for my discretionary trading, so looking to use an ATMStrategy rather than a fully automated strategy setup.

    Kind regards
    Frank

    #2
    Hello Frank,

    You can find an account with:
    Code:
    // Find our Sim101 account
    lock (Account.All) myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101");
    Below is a link to the help guide.
    https://ninjatrader.com/support/help...ount_class.htm

    As well as a link to an example that submits an order with an Atm attached through the addon approach.
    http://ninjatrader.com/support/forum...555#post515555
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RobotSyndicate, Today, 04:27 AM
    0 responses
    1 view
    0 likes
    Last Post RobotSyndicate  
    Started by Ray12345, Today, 04:10 AM
    0 responses
    2 views
    0 likes
    Last Post Ray12345  
    Started by Behungr101, Today, 02:16 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by omermirza, Yesterday, 08:37 PM
    2 responses
    12 views
    0 likes
    Last Post NT-Roland  
    Started by aelagha, Today, 01:28 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Jason  
    Working...
    X