How to Execute Two Buy Stop Orders Simultaneously?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #222384 quote
    Mikael K
    Participant
    Junior

    Hi everyone,

    I’m trying to program two buy stop orders to execute simultaneously. Here’s the code I’ve tried:

    ”If condition1 then
    Buy 1 contract at p stop
    Buy 1 contract at p+x stop
    Endif”

    However, only one of the orders seems to be getting executed. Does anyone have suggestions on how I can fix this or what I might be doing wrong?

    Thanks in advance for your help!

    Best,
    Mikael

    #222388 quote
    Nicolas
    Keymaster
    Master

    It is not possible to place 2 buy stop orders at the same time with code. The workaround is to place the second one once the first is triggered (check if you are on market and place the next one).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

How to Execute Two Buy Stop Orders Simultaneously?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Mikael K @mikael-k Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
2 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/13/2023
Status: Active
Attachments: No files
Logo Logo
Loading...