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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      59 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X