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 Bidder, Today, 09:16 PM
    0 responses
    7 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by connorgrant5, Today, 07:12 PM
    0 responses
    11 views
    0 likes
    Last Post connorgrant5  
    Started by Trader_55, Today, 06:01 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by aotubusen, Today, 04:28 PM
    0 responses
    19 views
    0 likes
    Last Post aotubusen  
    Started by amaltais, Today, 03:35 PM
    2 responses
    23 views
    0 likes
    Last Post amaltais  
    Working...
    X