Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set conditional to sell on all time high?

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

    How to set conditional to sell on all time high?

    I want to tell the strategy builder to sell all open orders at the stock's all time high or my indicator's all time high. I don't know how to set this. I already have the buy conditions solid.
    Note: I only use the built in strategy builder, not the programming side. Also, I have the free version with day to day information.

    Ideally I would want to say: if the price breaks the highest value within 240 bars, sell current position.
    Screenshot added for example.

    #2
    Hello shamwow,

    The all time high would mean running through all of the data for the instrument.

    You could have a double variable that is compared to the high of the current bar, and if the current bar is higher, then the variable is to the current bar.

    The MAX() would also let you find the highest high in a certain amount of bars.

    The 52 week high is fundamental data (that can be accessed from code, but not in the strategy builder)

    Below is a link to a forum post with helpful information about getting started with NinjaScript and C#. Be sure to watch the Strategy Builder 301 video linked in the post.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X