Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 opposite orders on the same minute

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

    2 opposite orders on the same minute

    Hello
    what would be the code of a sell order followed by a buy order if a condition is met, please?

    I mean, if I'm already on a short position and a reversal happen and I would like to cover my short position and go long right away. Of course, I dont want to wait the following minute to send my buy order,, if it's possible, based on a strategy refreshed every closing bars.

    Thanks a lot.

    #2
    Hi Bricolico, thanks for your question.

    In the managed approach reversals can be done automatically. For an example look at the SampleMACrossover strategy. It reads the long and short condition. So if the strategy is already long and it gets the sell short signal, it calls SellShort(), when that happens the long position is closed out and the short position is entered.

    Please let me know if I can assist any further.

    Comment


      #3
      Thanks for the follow up.

      Seems pretty simple to me. Will try this tomorrow.

      As always, thanks for this nice answer. :-)

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      56 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      132 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X