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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        51 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        275 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X