Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

execute chart trader click events when indicator conditions are met

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

    execute chart trader click events when indicator conditions are met

    I was using a strategy that automatically took long and short trades, but its kind of clunky and i would like to use atms so i figured i could get past that by making my strategy an indicator and when conditions are met use them to simulate click events on the chart trader but i dont know the names to subscribe, i was going to make custom buttons also to arm the strategy to fire when conditions are met then return to false as a safeguard

    #2
    Hello Kylemcfar57x,

    Thanks for your post.

    To have a custom NinjaScript strategy submit an entry order with protective orders that are controlled by an ATM Strategy template, you could use Atm Strategy Methods.

    We have a sample strategy, SampleAtmStrategy, that comes default with NinjaTrader demonstrating how these methods could be used.

    To view the sample strategy, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.

    For more information about using Atm Strategy Methods in a NinjaScript strategy, see the help guide documentation below.

    Using ATM Strategy templates in a NinjaScript strategy: https://ninjatrader.com/support/help...strategies.htm
    Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm

    Note that execution mouse click events would require custom C# logic and goes beyond the support we would be able to provide in the Support Department.

    You might find this reference sample helpful for information about creating custom buttons: https://ninjatrader.com/support/help...ui)-modifi.htm

    Please let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Here is a button trader I have not tried



      Also here is the file to one I got from support a few years ago that I did modify the condition sets and it worked well for the entries (I do not remember much about the exits)

      I could not find in search but I have the original file from 02/23/2021

      Attached Files

      Comment


        #4
        Click image for larger version

Name:	image.png
Views:	182
Size:	25.0 KB
ID:	1231474

        I changed the logic of the strategy into an indicator and im using custom buttons to enable portions of the code to take automated trade entryes from the indicator prints but i just wanted to know what the code that is executed when you click on the default chart trader so that the current atm you have selected is applied, it it possible to simulate a click event through code? i know the apex sniper system automated trader allows you to do this so i was thinking they must use a similar method, you will have to forgive me im new to ninja script

        Comment


          #5
          Also if thats not possible can i call the current atm strategy id that is selected in chart trader

          Comment


            #6
            Hello Kylemcfar57x,

            Thanks for your note.

            Simulating a mouse click event would require custom C# logic and goes beyond the support we would be able to provide here in the NinjaScript Support department.

            ​To submit orders using Atm Strategy Templates seen in Chart Trader, you would need to use Atm Strategy Methods in a custom NinjaScript strategy. There are no supported or documented means for submitting orders using Atm Strategy Templates from a custom NinjaScript indicator.

            See the help guide documentation in post # 2 for information about supported Atm Strategy Methods available to use in a NinjaScript strategy.

            This forum thread will be open for other community members to share their insights on unsupported code.

            Let me know if I may assist further.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              thanks for the replies its helpful to see other templates i found some good info here if anyone was attempting to do the same thing

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              79 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              146 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              79 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              52 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              56 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X