Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop loss on multiple orders at different entry points to be the same.

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

    Stop loss on multiple orders at different entry points to be the same.

    Hello Support!

    Please see attached chart pic and imagine the squiggly blue line is actually a straight line and represents a "stop price".

    I have developed a trading system that trades the price back in the direction of the "baseline" when it deviates from it, in this case a "trending baseline".

    The automated strategy I have to trade this chart will enter multiple positions on the "wicks" and take profit on set retracement levels from entry.

    At present I can program multiple retracement entries on these wicks and these entries will occur anywhere on the wick and I can attach a specific take profit to each retracement, but the problem is I only know how to attach a stop loss of x amount of ticks for each entry.

    In simple langauge, I am looking to set a stop loss of max 300 ticks for each entry that occurs on the wicks, if an entry happens on say 200 ticks from the baseline then the stop should be 100 ticks, if the entry is 50 ticks away from the baseline then the stop should be 250 ticks away (so basically any trade that happens on the wick, at whichever level, should have a fixed stop loss; but because these entries are happening randomly on the wick, i cannot define a specific stop loss for each entry.

    So my thought is in this language:
    Set stop loss for each new order at open of current bar + 300 ticks
    or
    Set stop loss for each new order to close of previous bar + 300 ticks

    This way every single trade entered on the wick will have a stop loss that is at the same price, no matter where on the wick it was entered.

    Hope you can help!

    Kind regards, Jason, DTB

    #2
    Hello TrendFollowingCapital,

    Thanks for your post.

    It sounds like you have figured out what you want to do. What help are you looking for?

    Are you using the Strategy Builder or are you coding in NinjaScript?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul.

      Yes I have figured out what I want to do but do not know how to do it, as I mentioned in my request!?

      I am looking for help on what the entry would be for the stop loss in the scenario in Ninjascript.

      I do not know how to spell it out any differently that I already have.

      Thank you, Jason

      Comment


        #4
        Hello Jason,

        Thanks for your reply.

        "So my thought is in this language:
        Set stop loss for each new order at open of current bar + 300 ticks
        or
        Set stop loss for each new order to close of previous bar + 300 ticks"


        Prior to the actual entry order you would specify the stop loss, for example:
        //for a long order:
        double myStop = Close[1] - 300 * TickSize;
        SetStopLoss(CalculationMode.Price, myStop);

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you Paul!!!!

          This is exactly what i needed, you have no idea how many hundreds of hours I have spent trying to get this to work!

          Excited to be launching this to the market soon!

          Cheers, Jason

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,279 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
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Taddypole, Today, 02:47 PM
          0 responses
          5 views
          0 likes
          Last Post Taddypole  
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          51 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Working...
          X