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

1 to 1 Stop and Target Based off InsideBar from previous Candle

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

    1 to 1 Stop and Target Based off InsideBar from previous Candle

    I am new to the strategy builder and struggling to figure out how to set a 1 to 1 take profit based off my Stop which is based off the the previous candles high or low with a one tick offset. My strategy is simple, time based, Trades on the RTY, 5 minute candles, InsideBar for entry. If price break out of the Inside Bars range by one tick it enter in that direction. and then sets the stop on the oppositie end of the Inside bar. I just cant figure out how to set the Take Profit, again based off the Stop. So if the stop is minus 15 ticks, my Take Profit will be plus 15 ticks. Any information to help is appreciated! Thank you in advance!

    #2
    Hello Day_Storay1,

    Welcome to the NinjaTrader forums!

    In the Strategy Builder you will need to use a custom series to do math with the Offset.

    If the stop price is being calculated as the open of an up / green bar, the Close with the offset subtracting the Open would be the distance in price from the close to the open.
    Save this distance to a variable, and you can use the offset from the Close adding this variable as the price for the limit order (profit target).

    Below is a link to a forum post discussing using offsets to do math.
    with regard to the attached image: Line A is an indicator Line B is the m period MAX of line A Line C is an average of this indicator A Line D is another average of this indicator A is it possible, possibly using the strategy builder, but without adding a temporary variable, to set on the condition: line C crosses below line D


    As well as a link to a forum post showing how to save a price to a variable and supply this to an order as the price.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      do you happen to have any examples? ok that does send me in the right direction!

      Comment


        #4
        Hello Day_Storay1,

        I'm not aware of an example of exactly the calculation you are trying to do, just general examples that show using the offset to do math.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        94 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X