Jump to content


  • Content count

  • Joined

  • Last visited

  1. Dooh!!! I see the problem! My Stop & Limit orders are not in the same object! Your example had them like that but I just didn't catch it! Geez!! Thanx for your help!!!
  2. Yes, I am using demo/test account. I will shut things down so that transactions are not going through then I will send you a private message with that information. Thanx! Update: When I tried to send the message I received: Physicsman cannot receive messages.
  3. Hello, First, thanx for you time on this. I feel it has to be something obvious that I am missing :-( But it is this scenario: 1) when the stop loss or take profit limit has been hit and your position is closed, the other order stays open? As in, you have no open position and a single stop loss / take profit order is left active on your account? Say the market rises to 1.1960 and hits your profit limit, this will automatically close your position and then it will automatically cancel your stop loss order at 1.1850. The problem is that my stop loss stays out there after the take profit has occurred. Then it eventually triggers as a sell with no guard rails. Are we sure the stop loss / take profit should not be an OCO within the IfDone? I have not been able to make it happen but...
  4. You recapped my scenario perfectly! Unfortunately, that did not change anything. After either the sell or limit in the IfDone[] becomes active, the other one is not. canceled. Somehow those two need to be an OCO... When I create this manually using tradingview they are OCO so I know it can be done. I am attaching a screenshot of an example.
  5. Hello, This is my first post on this forum :-) I am working with the API, through a demo account, and have created a buy limit order (order/newstoplimitorder) with a corresponding sell stop/limit. Here is my JSON: { "MarketId": 401484347, "AutoRollover": false, "Direction": "Buy", "Quantity": 10000, "PositionMethodId": 1, "BidPrice": 1.18175, "OfferPrice": 1.18187, "TriggerPrice": 1.18237, "TradingAccountId": XXXXXXXXX, "IfDone": [ { "Stop": { "TrailingDistance": 10, "Direction": "SELL", "Quantity": 10000 } }, { "Limit": { "TriggerPrice": 1.18449, "Direction": "SELL", "Quantity": 10000 } } ] } The "problem" is that the Stop/Limit orders need to be OCO orders because after the Buy order goes through, both of these orders are submitted. Once one has completed the other one stays out there. That's why they need to be OCO. I know this can be done because I am able to create that scenario through the tradingview web site. My questions is how can this be accomplished? I have tried several combinations of IFDone and OcoOrder to no avail. A working JSON example would be perfect! An explanation would work also. Thanx in advance!