Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting stop loss at predefined level

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

    Setting stop loss at predefined level

    I'm using the Condition Builder here as I'm not familiar with the Ninja script language, this is working well for me but I'm running into a problem here

    I have a strategy that will enter the market and submit a target and sop order at predefined levels,
    Now as the trade progresses I would like to have my stoploss adjusted to a predefined level ( as example: i would like the stoploss order to be @ the low 2 bars back)

    attached pics show how I'm trying to accomplish the but with no luck

    You help is much appreciated here

    Nico
    Attached Files

    #2
    What you want to do can not be accomplished with the Stop and Targets screens. What you want to do so is create an action on the Conditons/Actions screen under a new Set. There does not need to be a condition, just an action "Exit long stop" for example and for the stop price, assign the low 2 bars back.

    This will reset the stop price to the low 2 bars ago even if it is a worse price.

    If you want to maintain the stop price (it never gets worse) then you would have to program that in the NinjaScript editor.
    RayNinjaTrader Customer Service

    Comment


      #3
      First, thx for the quick reply,

      would this be a solution to avoid my adjusted stop price is worse then my original stoploss ( original stoploss is set to 20 ticks)
      ( see screenshot)

      thank you

      Nico
      Attached Files
      Last edited by nico_p; 03-13-2008, 06:36 PM.

      Comment


        #4
        Unfortunately not. What you want to do is use a variable to store the Low[2] price you entered with. Then when you are submitting your next modification at the latest Low[2], compare it against the variable to see if it is less than it. If latest Low[2] is less than variable then resubmit with variable instead of Low[2]. Hope that helps.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        638 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        572 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X