Clearing pending orders

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #234681 quote
    Morpheous
    Participant
    New

    I have a bug in my code where a position is getting closed and I cannot work out why, I’ve commented out all the places where the position is closed explicitly by the code and it makes no difference, so I assume it has something to do with a pending order.

     

    Is this the way to clear pending stop and target orders?

    set stop price 0
    set target price 0

    #234687 quote
    GraHal
    Participant
    Master

    Surely above code IS the reason your trades are getting closed?

    #234694 quote
    robertogozzi
    Moderator
    Master

    Those instructions disable SL and TP, as there’s no need to disable pending orders because they expire every candle and you simply stop placing them if you don’t want them.

    GraHal, Iván González, inverse and Morpheous thanked this post
    #234765 quote
    Morpheous
    Participant
    New

    I found the cause of my bug it was not related to the stop and target orders.

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

Clearing pending orders


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Morpheous @morpheous Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Morpheous
1 year, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/02/2024
Status: Active
Attachments: No files
Logo Logo
Loading...