Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with trading bot conditions

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

    Help with trading bot conditions

    Hello, I am developing a strategy for my bot where the conditions are as follows:
    1. When the 13, 21, 48, and 200ema are aligned in that order I want to take a long entry on the 13 ema.
    2. When the 200, 48, 21, and 13ema are aligned in that order I want to take a short entry on the 13 ema.
    3. When the emas are too close together, no trade should be placed.

    Basically, I need help with how I could go about specifying the distance between my emas, so the bot knows when it should trade and when it should keep waiting. Any ideas or tips would be very much appreciated!

    #2
    This is all in strategy builder by the way. I was wondering for EMA > EMA, would the offset feature be a way to check for spacing between the emas?

    Comment


      #3
      Hello Zescu,

      Thanks for your post.

      You could consider offsetting an EMA indicator value to detect if it is a certain distance from another EMA indicator value.

      For example, you could create a condition that checks if the EMA(13) offset by 5 ticks is equal to EMA(21) to detect if the EMA(13) is 5 ticks from the EMA(21)

      See the 'How to offset an item value' section of this help guide for more information about offsetting an item in the Strategy Builder: https://ninjatrader.com/support/help...on_builder.htm

      <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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X