Jump to content
Medved Trader Forums

Cannot get the trailing stop percent to work on websocket


Roger

Recommended Posts

Hello. I cannot get the trailing stop percentage setting to work in my websocket - AMTD account. 

Keeps giving error:   r\nThe Trailing Stop Parameter is not specified or is not valid\r\n.

In your docs you have "TrailingParamPercentInc" placed last in the AMTD order examples, but when requesting the AMTD setting from websocket, it has "TrailingParam" just below "StopBasis" in the websocket order list.

I have tried every possible position and spelling, but always get the error.

The trailing stop percent works when I send it in a MT trade ticket -AMTD account.

I have not tried with IB, hope to get to it tomorrow.

Thanks, Roger

Link to comment
Share on other sites

Mr. Medved, hello.

I still cannot get the trailing stop to work on AMTD or IB websocket.

Here is the code I use:

{

                    "cmd": "tradeCommandNew",
                    "accountKey": "IB:DU1111111",
                    "order": {
                        "Legs": [
                            {
                                "Symbol": "ZME",
                                "Quantity": 1,
                                "Action": "Sell",
                                "OrderType": "TStopPT",
                                "TIF": "Day",
                                "TrailingParamPercentInc": 5.0

I have tried every combination with wording and numbers, please let me know what I am doing wrong. With this format, buy orders work fine and I can place trailing stop order directly from MT. On the websocket I have tried both TStopDLR and TStopPT orders with no luck. Thanks.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...