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

rsi change direction

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

    rsi change direction

    hi im doing a rsi strategy and when cross any level(for example in 15m) the order start 2 candles after... how can i fix that? i try on bar close and each tick and still the same.
    the order start 30minutes after the condition.
    thanks for the help
    i atached the file
    Alejandro
    Attached Files

    #2
    Hello Alejandro,

    Thanks for your post.

    When using Calculate.OnBarClose with crossover conditions, the strategy will process logic only at the close of each bar. It will look back a set number of bars based on the lookback period you set for CrossAbove/CrossBelow and then the order will be placed on the next bar.

    If you are using crossover conditions (CrossAbove/CrossBelow) and want to have the strategy detect if a crossover occurred the moment it happens instead of waiting until the close of the bar, you would need to set the strategy to use either Calculate.OnPriceChange or Calculate.OnEachTick.

    See the attached example script demonstrating detecting a crossover the moment it occurs on the currently forming bar.​
    Attached Files
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      thanks Brandon!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rhyminkevin, Today, 04:58 PM
      1 response
      43 views
      0 likes
      Last Post Anfedport  
      Started by iceman2018, Today, 05:07 PM
      0 responses
      5 views
      0 likes
      Last Post iceman2018  
      Started by lightsun47, Today, 03:51 PM
      0 responses
      7 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      14 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      49 views
      0 likes
      Last Post futtrader  
      Working...
      X