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

Identifying rising values with a minimum of three bars

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

    Identifying rising values with a minimum of three bars

    I'm writing this strategy on Ninjascript. I want to be able to identify when there is a series of rising low's for consecutive bars, with a minimum of three rising low's.
    I want to enter a short position when the current low is less than the previous low of the series of rising lows. (low[0] < low[1])

    My sell entry would be at the previous low (low[1])
    With the sell exit being at the current close (close[0])

    This is what I have so far.

    if rising(low(3)) and low[0] < low[1]
    Enter Short

    I've attached a picture just to better explain exactly what I want.
    Attached Files
    Last edited by pssumking93; 12-02-2019, 05:49 PM. Reason: I've highlighted the entry and exit points on the picture in Orange

    #2
    Hello pssumking93,

    Thanks for your post.

    You could use something like:

    if (Low[1] > Low[2] && Low[2] > Low[3] && Low[0] < Low[1])
    {
    // entry order here
    }

    Please note that we do not provide strategy creation services. If you would like it created for you, we can provide references to 3rd party coders who can provide that service.
    ​​​​​​​
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mmckinnm, Today, 01:34 PM
    3 responses
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by f.saeidi, Today, 01:32 PM
    2 responses
    4 views
    0 likes
    Last Post f.saeidi  
    Started by alifarahani, 04-19-2024, 09:40 AM
    9 responses
    55 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    3 responses
    60 views
    0 likes
    Last Post NinjaTrader_SeanH  
    Started by traderqz, Today, 12:06 AM
    9 responses
    16 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X