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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    198 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    364 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X