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

ATM Strategy

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

    ATM Strategy

    Anyone knows if it is possible to set ATM orders on ninja 8 in the same way as we can do on Meta trader 5?

    Example:

    Let’s suppose that I open a long position on ES (Future SP500); in this trader, I will share the orders in 3 entrances, and every of them will have their own profit. Additionally, each new order taken, will cancel the previous one and only will consider the profit of this last one to all the hand in that price. Let’s see the example below:

    1 entrance: 2 contracts: Buy on 4129, profit on 4145 and stop on 4115
    2 entrance: 1 contracts: Buy on 4122, profit on 4132 and stop on 4115
    3 entrance: 1 contracts: Buy on 4120, profit om 4128 and stop on 4115

    1º possibility: The market moves and takes the first entrance and goes directly to 4145. In this way, the goal was achieved and the others orders are cancelled.
    2º possibility: The market moves and takes the first entrance, and doesn’t go to its take profit, instead of this, goes directly to the second entrance. In this way, the profit on 4145 is cancelled, and now the new final profit for 3 contracts is 4132 (medium price of buy on 4126,66). If the market moves to the profit, cancels the third entrance.
    3º possibility: The market takes the entrance 1,2 and 3; in this way, the take profit 4145 and 4132 are canceled, the take profit 4128 is will be consider, with the stop on 4115.

    Anyone knows if it is possible set this on ATM strategy?

    Thanks!
    Oneo

    #2
    Hello Oneobr09,

    Thank you for your post.

    What you describe would not be possible just using ATM strategy templates with manual entries, you would need to manually code an automated strategy using NinjaScript to submit the orders and update the stops and targets as you like, as well as cancel unhit entry orders.

    It sounds as though you're not very familiar with NinjaScript, but we do have resources to help you begin creating NinjaScript Strategies/Indicators. 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.

    Browse examples for many languages, with explanations and code side by side for easy understanding.


    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

    This example from our help guide may be helpful as it demonstrates changing the prices of stops and targets:



    You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify a 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.



    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you so muck Kate!!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ScottWalsh, Today, 06:52 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ScottW, Today, 06:09 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ftsc2022, 10-25-2022, 12:03 PM
      5 responses
      256 views
      0 likes
      Last Post KeyonMatthews  
      Started by Board game geek, 10-29-2023, 12:00 PM
      14 responses
      244 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Waxavi, 04-19-2024, 02:10 AM
      4 responses
      56 views
      0 likes
      Last Post sonia0101  
      Working...
      X