Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add ATM to SampleMACrossOver strategy

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

    Add ATM to SampleMACrossOver strategy

    How do I do this, please ?

    Existing sample strat that is included with NT8 generates entry, which is then managed by ATM selected in Chart Trader..
    Specifically, exactly how do I unite with the sample ATM strategy (completely illiterate coder here)?

    #2
    Hello jtrade,

    Thank you for your note.

    I would advise you to take a look at the Sample ATM Strategy that is built into NinjaTrader as this demonstrates what is necessary to use an ATM Strategy template within a NinjaScript Strategy. It does require more advanced programming skill, so if you're just wanting to create a strategy with a user input stop and target, you could simply program those into a strategy using Set or Exit methods.

    Important information regarding using ATM Strategies within a NinjaScript Strategy can be found in our help guide here:



    As well as a link to the ATM Strategy Methods:



    However, if you're not familiar with NinjaScript, I recommend starting small and working with some basic concepts. Please see the information below. All links below are publicly available.

    The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

    I'm also providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.

    Strategy Builder 301

    NinjaScript Editor 401

    If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our NT7 help guide first:

    Basic Programming Concepts

    For general C# education I have personally found Dot Net Perls to be a great reference site with easy to understand examples.



    We also have great resources in relation to Strategy Development on our Support Forum. There is a very active developer community in our support forum that supplements the responses provided by NinjaTrader support staff providing all users with an exceptional support experience.

    Take me to your support forum!

    There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under New -> NinjaScript Editor -> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

    We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:

    Click here to see our NinjaScript Reference Samples

    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.

    Alphabetical Reference

    And our Educational Resources in the NinjaTrader 8 help guide.

    Educational Resources

    A set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide.

    Condition Builder

    You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

    Please let me know if I may be of further assistance.​

    Comment


      #3
      Thank-you for your fast response, Kate.

      Rather than stop trading and spend my senior years learning to program (something I wish I had done 50 years ago, along with touch typing), is it not possible to point me to a clear example of what I could simply paste into the SampleMACrossOverStrategy at the following point:

      if (CrossAbove(smaFast, smaSlow, 1))
      EnterLong();
      else if (CrossBelow(smaFast, smaSlow, 1))
      EnterShort();


      In plain English instructing the strategy as follows: "after you have kindly sent the above entry signal - Long or Short - please hand over to the selected ATM"? This seems like a straightforward instruction to give - useful to many NT8 users - & should not really require having to engage a third-party programmer.

      I don't see this in the Tips & Tricks links you kindly sent, nor can I find any specific video support...
      ... and I see I am far from comprehending the replies to this forum member, essentially asking the same question... it is indeed a great pity that the option to attach an ATM is not programmed into the Strategy Wizard https://ninjatrader.com/support/foru...uilder.​

      Comment


        #4
        Hello jtrade,

        Thank you for your note.

        Unfortunately there's not a simpler method of using an ATM Strategy in a NinjaScript Strategy than what is demonstrated in Sample ATM Strategy - it is going to require different methods for entry than a regular strategy would use. However, I have added a vote for you to an existing feature request to be able to use ATM Strategy Templates with the Strategy Builder. This is being tracked under the number SFT-1986.

        As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

        You can always use the Set Methods on the conditions and actions screen in the Strategy Builder to create stops and targets that would submit automatically when an entry order fills. I'm attaching a simple Strategy Builder strategy that demonstrates this.

        Please let me know if I may be of further assistance.​
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X