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 NullPointStrategies, Today, 05:17 AM
    0 responses
    46 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    66 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X