Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA crossover "too slow" to long/short on breakout.

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

    EMA crossover "too slow" to long/short on breakout.

    Hello everyone,

    Very new to NT. I'm trying to test this basic strategy of going long/short when the EMA(8) crosses EMA(55). The code works, but i'm having a bit of trouble to get it to do what i want.

    I would like to get it to do one of these 2 things:
    Buy instantly (not on bar close) as the candle/price crosses above the EMA(55)
    OR
    Buy instantly (not on bar close) as EMA(8) crosses above the EMA(55)

    I'm having a bit of trouble understanding how to do that or if it is even possible?

    Any help is appretiated
    Attached Files

    #2
    Hello mohdhm,

    Thanks for your post.

    In the strategy analyzer your strategy code is executed at the end of the bar and any orders are placed on the next bar.

    You are running with 15 minute bars, you might try using 5 minute bars.

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello mohdhm,

      Thanks for your post.

      In the strategy analyzer your strategy code is executed at the end of the bar and any orders are placed on the next bar.

      You are running with 15 minute bars, you might try using 5 minute bars.
      Hi Paul,

      The strategy needs to be on the 15 minute chart. Can this not be done using ticks or pricechange? Would ticks even work with cryptocurrencies?

      Comment


        #4
        Originally posted by mohdhm View Post
        Hi Paul,

        The strategy needs to be on the 15 minute chart. Can this not be done using ticks or pricechange? Would ticks even work with cryptocurrencies?
        You will need to enable Tick Replay or else use a secondary time frame for the executions.

        ref: https://ninjatrader.com/support/help...ick_replay.htm

        You can also use High Fill Resolution in the Strategy Analyzer.

        ref: https://ninjatrader.com/support/help...ical_fill_.htm
        Last edited by koganam; 06-25-2018, 04:13 PM.

        Comment


          #5
          Hello mohdhm,

          Thanks for your reply.

          As member koganam has advised you might utilize Tick Replay, however, if your data provider does not support historical tick data you may not be able to use this option. You could utilize a secondary time frame however if you choose to do this then you would not be able to use the High fill option as specified by Koganam (but since you are adding a data series already you can add one that would meet your needs for order fill).

          Here is a link to a working example of this: https://ninjatrader.com/support/help...ipt_strate.htm

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          54 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          131 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 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
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X