Jump to content
Medved Trader Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Roger last won the day on April 25

Roger had the most liked content!


1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Got it. json.Description. When { } then you just skip all that is in between.
  2. Hello, I am able to get most other values from the API, but having trouble formulating code for the following: alertTriggerUpdate fromScan; "Description" alertTriggerUpdate fromNews: "syms" and "Description" Example: When sending the request to alertTriggerUpdate: the code-- json.result.triggerValue, will return the triggerValue from a scan, ......etc. but json.result.Description or json.result.[0].Description will not return the Description value (just blank), tried many other combinations. Same problem when requesting "syms" and "Description" in the alertTriggerUpdate for News. What are the correct codes? Thanks, Roger
  3. Mr. Medved, can you place a Boolean T/F flag for news in the variable list for creating a scan. Thanks for a great product.
  4. Hello, what is candle size in seconds and how can I use in my scans? How Is size measured? % or $ from what reference point? I am trying to get price increase from candle open for ? seconds. This will be added to my other scan criteria for a scan. I have searched the site, but cannot find info. Thanks, Roger
  5. Both give error in Visual Studio Code and the code will not run. addmebal (json.result.AvailableFunds~USD) addmessages (json.result.AvailableFunds:USD) The underscore _ does not give error in Visual Studio Code, so may work. addmessages (json.result.AvailableFunds_USD) Thanks.
  6. Mr. Medved, I tried addmebal (json.result.AvailableFunds~USD); Still will not work. Thanks.
  7. Hello, I am having trouble getting from websocket -- balancesUpdate -- the AvailableFunds:USD value. The colon is creating an error in my javascript code. I can access other websocket data that does not have that colon. I have tried many code variations, with no luck. Examples: This works: addmessages(json.result.accountKey) no colon This does not work: addmessages(json.result.AvailableFunds:USD) the colon causes an error Any suggestions? Thanks, Roger
  8. 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.
  9. 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
  10. What is the correct coding format to connect to the websocket? { "cmd" : "connect", "password" : "something" } Reply: [2021-06-28 12:47:00] { "cmd": "connect", "success": "fail", "resultcode": 400, "result": "specify password" Thanks, Roger
  11. Mr. Medved, what is scan code for placing the symbol column data in the alert log description? It can be done in the precoded alerts in MT alert editor by right clicking on Note. I wish to do the same for my new scans. Can you provide a sample code. Also, where can I view the code for the precoded alerts in the alert editor? Thanks, Roger
  • Create New...