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

Strategy Builder parsing out key price levels?

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

    Strategy Builder parsing out key price levels?

    I am building a strategy for the mym that buys and sells at key price levels, but since the dow moves up and down so many hundreds of points it makes sense to somehow parse out the price and then ignore the first two digits. For example if the dow is now at 29713 maybe I want to have a stop 5 points below 29793 and take profit at 29780, but I don't want to have a giant list of prices for every hundred or thousand points, just parse out the last 3 digits and have 4 or 5 key levels to put take profit or stop. Is there any way the strategy builder can do this or can you point me to the code that can accomplish this? In other words parse out the price and then put the stop or take profit above or below that price but one piece of code works for all prices?

    #2
    Hello terminatorT1000,

    Thank you for the post.

    If you are looking to offset from a price the builder could do that, you can use the builders arithmetic functions to add or subtract a number of ticks from a given price. When you are making a condition you would see the Offset listed and from within the offset area you can define the type of offset and amount.
    The stops and targets page could not be used in this way if you wanted to calculate a price yourself, you can however use a fixed offset from the stops and targets page like 8 ticks which would be calculated based on the entry price.

    To otherwise parse or check a part of the whole number would require manual coding.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    31 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,281 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X