Jump to content
Medved Trader Forums

Kasper

Members
  • Posts

    128
  • Joined

  • Last visited

  • Days Won

    1

Kasper last won the day on June 26 2020

Kasper had the most liked content!

Reputation

4 Neutral

Recent Profile Visitors

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

  1. Kasper

    MT WS API

    Hello, Will it be possible to remotely control scanner actions for a portfolio window from API commands? Start/Stop/Pause scanner Enum and switch scan Enum and edit params Freq etc. The goal is to daisy chain some scans and may be get filtered results to generate a report. Thank you.
  2. Kasper

    API QUESTRADE

    I use Questrade and MT handles all the heavy lifting. After adding Questrade under Trade/Account once, I only have to login to Questrade account every once in a while.
  3. ah ok, same problem as last time. 😌I'll go through my command syntax again. Thank you Jerry
  4. Hello👋 Not sure if there has been a recent change but I'm seeing intermittent error on sending commands. Following are tested on my app as well as WSTester.exe. Socket connection opens but fails to connect with password. I now see in logs <******> instead of plain password when it fails. But WSTester or my app are sending all commands as usual. MT: 18:31:50.79222 07412: API_WS: SENDING (6a4dbdcf-9): 00009: CONNECTED 23-07-30 18:31:57.581: SENDING: {cmd: "connect", Pwd: "MYPASSWORD"} MT: 18:31:57.59143 77392: API_WS: RECEIVING (6a4dbdcf-9): 00034: {cmd: "connect", Pwd: "<**********>"} MT: 18:31:57.60181 07412: API_WS: SENDING (6a4dbdcf-9): 00199: { "cmd": "connect", "success": "fail", "resultcode": 400, "result": { "time": "2023-07-30T18:31:57.135", "ver": "1.1.9930.105", "reason": "need to specify password" } } MT: 18:33:21.04030 80588: API_WS: RECEIVING (6a4dbdcf-9): 00019: {"cmd":"enumPorts"} MT: 18:33:21.05051 07412: API_WS: SENDING (6a4dbdcf-9): 00108: { "cmd": "enumPorts", "success": "fail", "resultcode": 401, "result": "need to connect first" }
  5. Jason, I don't know if I fully I understand your use case but here's something you can try to read a chart's frequency from WS API. Calculate CandleSizeInSec function's value in a Painbar to assign frequency to chartvar() or Intervar(). Set this paintbar on the chart then value read from your app from getintervar()
  6. Hello, I am not seeing response from MT except Connect command. Following is from WSAPI Tester: What is "no cmd in message"? MT: 11:46:21.66385 27048: API_WS: RECEIVING (6767054c-0): 00019: {"Cmd":"enumPorts"} MT: 11:46:21.66785 43344: API_WS: no cmd in message: {"Cmd":"enumPorts"}
  7. I see following in Beta 9880.100. ADDED - PAINTBARS/SCANS - Ability to reference other symbol data. NOTE: Calculations are only triggered by primary symbol's changes, not secondary one Can you tell which function is it?
  8. Hello Mike, I am now using Set/GetInterVar between MT and my WS-API app to exchange data. Can you tell me if it should work like data subscription? Within MT GetIntervar can stream between two scans. Do I need to do something on app for something similar? Also, is there a way to throttle a scan, say one scan pass over all symbols then wait n seconds before going again. Or if frequency on portfolio is set to 5 minutes thena rule to run scan every (frequency * 0.25) minutes. Thank you.
  9. Is there a safe way to ready/write into to text (non-code csv) file from scans? Error: 24, 19 CS0103 Possible security violation
  10. Thank you, CandleSizeInSec works good for intraday. But on historical it returns following: 1Day=60 1week=300 so on.. Not sure if this is expected.
  11. If it's not possible or too complicated then no worries. I am able to use DefinedPaintbarParameter and enter frequency identifier manually for each scan window.
  12. Hello Mike, thanks for this info, I'll try it out. I assume if there are any variables in external script requiring access to data will have to be added to internal paintbar code? The other question I have is about scan chart parameters such as frequency can be read from within a scan? I want to append this to naming SetInterVar() then call by GetInterVar() elsewhere based on frequency selected.
  13. Can you share an example external file and how it used within a scan? What type of code or languages are compatible? Including External Code #include This allows you to include code from an external file (specified following the #include). Example: #include c:\temp\mylibrary.code
  14. I sent you log, I did not see a symbol limit pop up in MT or TWS. If there was an error, it never recovered despite deleting symbols and restarting MT. I'll check again tomorrow.
×
×
  • Create New...