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

Use ATM strategy for ninjascript entries

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

    Use ATM strategy for ninjascript entries

    Hi NT8,

    I would like for a ninjascript strategy to enter using the ATM strategy instead of the Tgts and Stops in strategy that I built from the strategy builder.

    To ensure I clarify this: I mean to enter using the ninjascript strategy and apply the ATM selected to the trade - using the <ATMStrategyTemplate> as the saved name of the ATM strategy.

    I have the SampleATMStrategy script and have looked at it and tried to understand how to use the code in my scripts, but I find it difficult to know specifically what I need to change about my script to create ATM entries. I am not great at C#, but I do have some experience, and would like to learn more for myself so that I can change the code of ninjascript strategies I start using the Strategy Builder to use ATM strategy entries. To facilitate this, I have a basic ninjascript strategy attached that simply enters on Key Reversal UP/DN triggers with defined stops and targets. If someone could modify this script and put in //comments helping me understand what was changed this would very much help me understand how to change my strategies to ATM entries.

    in Sum:
    - Can anyone please direct me to resources more than the help guide on how to learn how to apply ATM strategy to my Ninjascript strategy scripts? Are there training videos showing this?
    - Can anyone change the attached script and //comment with the changes to show me what was changed and why (not looking for a huge description)
    - Please add a vote to the registry for building this function as a selection in the Strategy Builder

    Thank you!
    Attached Files

    #2
    Hello Austiner87,

    Thanks for your post.

    The strategy builder does not have the ability to work with ATMs. I have added your vote to SFT-1986, "Create the ability to call ATM strategies from the strategy builder". A feature request does not mean the feature will or will not be implemented.

    Please note that as a small team we do not provide code writing or debugging services. If no forum member provides what you need, you may want to consider hiring a 3rd party programmer to create what you need and we can provide a link to such services in the NinjaTrader Ecosystem.

    There are no training videos on the hybrid strategy SampleATMStrategy. The strategy code itself is well commented to help understand what the methods are doing. Here is a link to the help guide for the ATM methods used in the example strategy: https://ninjatrader.com/support/help...gy_methods.htm

    If you would like to tackle this yourself, a better approach might be to make a copy of the SampleATMstrategy and modify it to add your entry conditions. In the strategy this line is the entry conditions: if (orderId.Length == 0 && atmStrategyId.Length == 0 && Close[0] > Open[0]) and you would need to specifically replace && Close[0]>Open[0] with your specific entry conditions.


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you, this helps, please close this issue.

      I will ask for a what I believe to be a less difficult request than a feature in the strategy builder would be a training video on how to modify the ATM strategy code to different entry/exits. Thank you

      Comment


        #4
        Hello Austiner87,

        Thanks for your reply.

        I am not aware of any training videos on how to modify the sampleATMStrategy.

        Here is a link to all of the available platform training and recommend Ninjascript Editor 401, offered every other Thursday at 4:00 PM EST. https://ninjatrader.com/PlatformTraining
        Here is a link to a previous recording:https://www.youtube.com/watch?v=BA0W...uWXkWe0Nf&t=14

        Ninjascript is based on C# programming language, there are many on-line courses/tutorials that you can access from many providers.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        4 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        40 views
        0 likes
        Last Post alifarahani  
        Started by Waxavi, Today, 02:10 AM
        1 response
        18 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by Kaledus, Today, 01:29 PM
        5 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X