Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading with profit and stop loss objecives

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

    Trading with profit and stop loss objecives

    Hi!

    please, I would know if like with ATM, I could have an strategy that uses a stop order to open a position and at the same bar two exit instructions one with the profit and one with the stoploss, that means that the strategy must throw 3 orders on the next bar, one for entry and two for the exit, but this is the important, the strategy is throwing the 2 exits waiting the order entry gets in the market.

    Is this possible? perhaps I must overwrite any method used to manage the entries? do you have any thread example or code example to do this?

    thankyou!

    #2
    Sorry,

    but I think I've found it, I suppose I can set the profit and stop loss with the SetProfitTarget and SetStopLoss in the initialize method, but, could the strategy move this parameters while the position is opened? by using this two instructions in the onbarupdate method?

    thanks again

    Comment


      #3
      Sure joanNT, this would be possible to move dynamically in the OnBarUpdate -

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      59 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      143 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      161 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      283 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X