Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change in a strategy. Would this change be easy or shall i hire coder?

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

    Change in a strategy. Would this change be easy or shall i hire coder?

    I have a ATM strategy and been running for last 2 months on my sim account. I have realized that it hardly ever have more than 2 looses in a row. So i need to run it on my live account and the strategy should only take trades after two losses in a row. So now it trades all trades. But i only want it to take the trade after 2 losses in a row. Would that be possible? Easy or should i get a coder?

    #2
    Hello Mosreloaded,

    Thanks for your post.

    By '2 losses', do you mean 2 down (red) bars in a row?

    Is this a NinjaScript strategy you developed that uses Atm Strategy methods to place orders with an ATM Strategy template to control stop/target orders?

    Ultimately, you would need to create a custom NinjaScript strategy to accomplish this.

    You could create a condition that checks if (Close[0] < Open[0] && Close[1] < Open[1]) to detect two down (red) bars in a row and then call your AtmStrategyCreate() method to place an order.

    See the SampleAtmStrategy script that comes default with NinjaTrader for an example of how to code a NinjaScript strategy that uses Atm Strategy methods. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.

    And, see this help guide page about Atm Strategy methods: https://ninjatrader.com/support/help...gy_methods.htm

    Let us know if we 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
      Hi, yes if you look at the attached chart you will see that the atm strategy took 3 trades. First 2 was a loss and then a win. At the moment the strategy takes all the trades when conditions is in order. What i need to do is to only make the strategy take a trade after 2 losses in a row. So what i need is the following - in this attached chart my atm will skip the first two trades and because it was losses it will then activate to trade the next trade. Would that be possible?
      Attached Files

      Comment


        #4
        Hello Mosreloaded,

        Thanks for your note.

        A NinjaScript strategy that uses Atm Strategy methods is not the same as the ATM Strategy template seen in Chart Trader.

        See this help guide page about using Atm Strategy methods in NinjaScript: https://ninjatrader.com/support/help...strategies.htm

        Ultimately, it would not be possible for a strategy to only place orders after two trade losses. If the strategy does not place trades until 2 losses occur, there would be no way for the strategy to place the initial 2 orders that resulted in a loss.

        For example, 2 losses cannot occur if the strategy does not place any trades that result in those two losses. There will be no orders placed by the strategy which would result in a loss if trades are only placed after 2 losses since the condition is to only place trades until 2 losses occur.

        Note that strategies can only read orders placed by that specific instance of the strategy. It cannot read manually placed orders or orders placed by another strategy.

        Let us know if we may assist you 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

        Latest Posts

        Collapse

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