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

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

      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by f.saeidi, Today, 01:12 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by rbeckmann05, Today, 05:50 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by elirion, Yesterday, 09:48 PM
      2 responses
      14 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by betsuni_123, Yesterday, 04:20 PM
      3 responses
      21 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by doihaveto13, Today, 05:45 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X