Skip to content

Modify a TakeProfit #201

Closed Answered by dragonflyuk
dragonflyuk asked this question in Q&A
Apr 10, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Thanks, I didn't include because at that point I didn't have have any :-)

However I've been playing, and for the benefit of others, Ive got as far as :-

r = orders.OrderReplace(
    accountID,
    td["takeProfitOrder"]["id"],
    data={
        "order": {
            "units": -int(td["currentUnits"]),
            "instrument": "EUR_USD",
            "price": "{0:.5f}".format(stp),
            "type": "TAKE_PROFIT",
            "tradeID": td["id"],
        }
    },
)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hootnot
Comment options

Answer selected by dragonflyuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants