Kasper
-
Posts
128 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Blogs
Gallery
Downloads
Events
Posts posted by Kasper
-
-
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.
-
ah ok, same problem as last time. 😌I'll go through my command syntax again.
Thank you Jerry
-
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: CONNECTED23-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"
} -
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()
-
Thank you Jerry
-
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"} -
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?
-
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.
-
Is there a safe way to ready/write into to text (non-code csv) file from scans?
Error:
24, 19 CS0103 Possible security violation -
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.
-
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.
-
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.
-
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 -
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.
-
I have 26 symbols in MT in two portfolios, both using IB data feed. I noticed this morning, AAPL, AMD and SPY stopped streaming. After clearing data and backfill, I got AMD back to normal. But AAPL is still not streaming, SPY streaming Last price but no bid/ask. Also, it backfilled only current day for Intraday.
I am on 9810.100, is there a known issue like this? Other symbols are streaming ok.
-
Thanks for clarifying your formula. Mine was based on my understanding of description of this column in MT help docs. i.e. Range as % of price.
The formula you shared is similar to IV rank formula, but for price.
-
The calculation is slightly different with each data feed, but that's due to it's feed's speed.
Here's actual example with IB:
Symbol AAPL Last 136.50 Low 133.73 High 137.65 Rng 3.92 Rng % 70.66326531
I calculated below for same data feed.
SetScanResultColumnName(0,"Range%");
SetScanResult(0,((SymbolData.High - SymbolData.Low) * 100 / SymbolData.Last));
Range% 2.871795 -
Hello,
Can you check if Range% values for Day/52W are correct in columns? They seem too high for Day and too low for 52 week.
Thanks.
-
Thank you
-
Hello,
There's an option chains setting to display number of contracts near the money which is minimum 3. Can this be reduced to just 1?
Thank you.
-
Num lock was on, I figured out the issue. I had 7 assigned to a custom hotkey. In chart and trade ticket, it was calling the hotkey instead of number when typing price or quantity.
-
Hello,
Number 7 key on number pad does not send 7 in some situations.
On trade ticket, it send Home.
On chart, I use 7 for 200 bars shortcut but it only changes the number in drop down, does not change the bar on chart. I have to use number line of keyboard.
Also non-urgent issue, on the option risk analysis, toggle buy/sell or call/put messes up the graph view. Starts to show opposite direction of chosen.
-
Since MT doesn't have window work spaces or tabs, I would like to suggest following that hopefully can be implemented easily.
Sub-Layout: From MT Dashboard > Windows tab, user selects required windows with CTRL+Click then Right click to save as a sub-layout. This sub-layout can be used to open all the windows in this group.
User can CTRL+Click items in the Dashboard > Windows as assign a Window group colour or name for easy window management e.g Minimize/Restore/Close/Move/Lock that apply to all windows in the group. MT currently have a feature to Shift + Arrow to select windows then minimize/Restore them.
-
Thank for adding the columns and scan data points for options. You guys rock. 🚀💯
MT WS API
in Feature Requests
Posted
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.