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 and CrossBelow

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

    CrossAbove and CrossBelow

    Hi EV,

    Help me pleace to make clear how to use CrossAbove and CrossBelow functions.
    I have my custom indicator which sets plot on some value(for example it sets the average of the first bar of the session).
    How do I use CrossAbove or CrossBelow function to trigger that Low[0] or High[0] values crossed my plot
    I've tried something like this:
    Code:
    CrossAbove( Algo(lev1,  startTime, width).O1,Low[0], 1)
    Code:
    CrossAbove( Algo(lev1,  startTime, width).O1,Low[0], 0)
    Code:
    CrossAbove( Low[0], Algo(lev1,  startTime, width).O1, 0)
    Algo(lev1, startTime, width).O1 - it's my indicator which shows the average of the first bar

    #2
    Hello dv926844,

    Thanks for your post.

    In the CrossAbove and CrossBelow methods, the crossing dataseries must be listed first, the crossed value can be a static/fixed value or another dataseries.

    Try using the Low as the crossing data series and your plot as the crossed dataseries.

    CrossAbove( Low, Algo(lev1, startTime, width).O1, 1)

    Reference: http://ninjatrader.com/support/helpG...crossabove.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Kaledus, Today, 01:29 PM
    0 responses
    1 view
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by PaulMohn, Today, 12:36 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X