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 geotrades1, Today, 10:02 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by ender_wiggum, Today, 09:50 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by rajendrasubedi2023, Today, 09:50 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by bmartz, Today, 09:30 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X