• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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, 04: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 Sh00tHerMcGavin, Today, 07:39 PM
    0 responses
    1 view
    0 likes
    Last Post Sh00tHerMcGavin  
    Started by Mberg, Today, 05:13 PM
    0 responses
    0 views
    0 likes
    Last Post Mberg
    by Mberg
     
    Started by Barry Milan, Today, 01:33 PM
    2 responses
    8 views
    0 likes
    Last Post marcus2300  
    Started by NW Trader, Today, 03:42 PM
    2 responses
    7 views
    0 likes
    Last Post NW Trader  
    Started by ralett, Today, 01:42 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X