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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      649 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      576 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X