Duplicate orders

Viewing 3 posts - 1 through 3 (of 3 total)
  • #126049

    15 minute chart Brent Crude

     

     

    Brent Crude 15 minute chart

    I’m having difficulty with the “Buy xxxx Contract At xxxxx Stop” function. Buying price is set at a fixed Buylevel parameter.

    Basically the system is set up so that it buys a position using this function but it also sets a “target pprofit” for the first few bars in case theres a rapid increase to a certain level. On the occasions where this target is met it sells at the profit target but then opens another position on the next bar despite it being higher than the Buylevel parameter, which I do not want it to do.

    I’m assuming this is because the Buy at Stop is being renewed every bar in the code but it still executes a trade even the the price is above the buylevel stop that is set.

    Is there anyway to stop it doing this? I would like it to take the profit and not enter again until the next signal condition.

    An example of this occuring is on 7th April 2020

    #126052

    If the price is above the pending stop order price, the order should open. You can add a condition to test if the actual price is below the buy stop level to prevent an order to open.

    #129160

    Thanks I’ll give that a go.

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login