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 rjbtrade1, 11-30-2023, 04:38 PM
    2 responses
    75 views
    0 likes
    Last Post DavidHP
    by DavidHP
     
    Started by Stanfillirenfro, Today, 07:23 AM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by FitSpressoHonest, Today, 09:14 AM
    0 responses
    1 view
    0 likes
    Last Post FitSpressoHonest  
    Started by Davide999, 05-18-2023, 03:55 AM
    4 responses
    557 views
    1 like
    Last Post kcwasher  
    Started by rexsole, Today, 08:39 AM
    2 responses
    8 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X