Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    57 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    35 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X