Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM in ninja script strategy

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

    Thanks

    scjohn thanks for the great idea you've shared on moving the first target. I am happy to tell you that it works now.

    Comment


      ATM and Script

      Hello, i have build a strategy to open and close trades based on MA's. I have also custom made a ATM for Trailing stops and take profits, how do i make the ATM execute the same time as the Strategy?

      Comment


        Originally posted by ttt365 View Post
        Hello, i have build a strategy to open and close trades based on MA's. I have also custom made a ATM for Trailing stops and take profits, how do i make the ATM execute the same time as the Strategy?
        Welcome to our forums here - please have a look into the SampleAtmStrategy installed on your NinjaTrader platform per default, it would show how the AtmStrategyCreate() method is used to enter positions that are then managed by your chosen ATM strategy template.

        Comment


          In the Control Panel click on:
          Tools->Edit NinjaScript->Strategy->SampleAtmStrategy->Ok

          This strategy should be able to get you going in the right direction. Just remember that this is a very dumb down example. Controlling an ATM in a strategy can get very complicated, very quickly.

          Comment


            Connect to database

            Is Ninja can connect to an access database?

            Comment


              Hello luxurious_04,

              Yes, it may be possible but is beyond our scope of support. I suggest taking a look at the following post which offers an example of hooking up to a mySql database.
              Ryan M.NinjaTrader Customer Service

              Comment


                Anyone there knows the solution for this:

                I have a variable that contain a value that is cumulative like this

                total = total + 1;

                Now, I want this to be updated on my database and the update query should be like this

                sql = "UPDATE tableTotal SET totalField = 'total' WHERE id='0001'";

                the problem is when I go to my access database the value of totalFied is a word 'total'. I want the value should be the total from the computation which is the cumulative:

                I want the result of total = total + 1 to be save in the totalField of my table.

                Anyone could help on this matter? Thanks in advance..

                Comment


                  Please help me on making a textbox on the chart.

                  Comment


                    Originally posted by luxurious_04 View Post
                    Please help me on making a textbox on the chart.
                    luxurious_04, you can use the DrawText() / DrawTextFixed() methods here.

                    Comment


                      Is there a way that strategy can plot values on the chart? Please give a hint. Thanks in advance.

                      Comment


                        Hello,

                        Sure, please see the below sample:

                        When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability


                        Let me know if I can be of further assistance.
                        BrettNinjaTrader Product Management

                        Comment


                          Thank you so much Brett..more power to you.

                          Comment


                            Question. Each strategy should have a plot placeholder? Can we not combine all plots of 2 strategies into 1 plot placeholder?

                            Comment


                              Originally posted by NinjaTrader_Brett View Post
                              Hello,

                              Sure, please see the below sample:

                              When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability


                              Let me know if I can be of further assistance.

                              How do I use this? I mean I let the strategy run and put the placeholder indicator and nothing is being plotted. Does this work on replay?

                              Comment


                                Hello,

                                Sorry not clear what your trying to do. You cannot do cross strategy communication. However you can import in indicator data into NinjaTrader by simply calling the indicator. One strategy can call multiple indicators. However one strategy cannot call another strategy.

                                I look forward to assisting you further.
                                BrettNinjaTrader Product Management

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                666 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                377 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                110 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                575 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                580 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X