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 Human#102, 05-08-2024, 09:54 AM
        3 responses
        16 views
        0 likes
        Last Post Human#102  
        Started by ETFVoyageur, Today, 06:11 AM
        0 responses
        5 views
        0 likes
        Last Post ETFVoyageur  
        Started by cencored, 03-31-2016, 05:09 PM
        9 responses
        2,454 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by James650, 05-07-2024, 08:25 AM
        2 responses
        8 views
        0 likes
        Last Post James650  
        Started by ssijbabu, 10-07-2012, 07:10 AM
        7 responses
        4,466 views
        0 likes
        Last Post alex@n
        by alex@n
         
        Working...
        X