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 Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,771 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X