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

CrossAbove()

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

    CrossAbove()

    Hi,

    CrossAbove(EMA(10), EMA(20), 1)

    Checks for a cross above condition over the specified bar look back period.

    But I want to check Cross above for the current bar. Not for the look back period.

    Thanks

    #2
    Hi Sameer,

    Thank you for posting.

    Unfortunately, you would not be able to use the CrossBelow and CrossAbove to check the current bar. You will need to have a minimum of 1 or greater in order to work.


    Please let me know if I can be of further assistance.
    Last edited by NinjaTrader_CalH; 06-06-2013, 02:50 PM.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank u very much.....but i checked this syntax it is not working in Strategy Analyzer for historical testing. Please verify

      Just I read this thread........

      Originally Posted by NinjaTrader_Matthew
      CrossAbove or CrossBelow will need to occur in the last 1 bar or greater. There is no way to check for a cross above/below 0 bars ago.

      For the simulator, are you running that strategy on Calculate On Bar Close set to True or False? In real-time, if you want the strategy to enter the position at the point these two values cross, you would need to run on COBC = false. When set to true, the strategy will not take action until that condition is true and the next bar has closed.

      More information on this property can be found below:

      http://www.ninjatrader.com/support/h...onbarclose.htm
      Last edited by Sameer; 06-06-2013, 02:29 PM.

      Comment


        #4
        Hi Sameer,

        Thanks for the update.

        Apologies.

        This is correct when trying to use the CrossAbove and CrossBelow. You will need to have a minimum of 1.

        Please let us know if we can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by lorem, 04-25-2024, 09:18 AM
        20 responses
        85 views
        0 likes
        Last Post lorem
        by lorem
         
        Started by xepher101, 05-10-2024, 12:19 PM
        4 responses
        51 views
        0 likes
        Last Post xepher101  
        Started by DawnTreader, 05-08-2024, 05:58 PM
        22 responses
        82 views
        0 likes
        Last Post DawnTreader  
        Started by Mathias79, Today, 03:44 PM
        0 responses
        17 views
        0 likes
        Last Post Mathias79  
        Started by Austiner87, Today, 03:42 PM
        0 responses
        12 views
        0 likes
        Last Post Austiner87  
        Working...
        X