Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,544
  • Joined

  • Last visited

  • Days Won

    125

Everything posted by Mike Medved

  1. Go to the Settings / Application / API - and click on the Documentation link there next to WS API. Or just go here: https://docs.google.com/document/d/15IvYQEYzSeftTSEdVhsptAguM0fGm9mTJFSDDAK7zWE/edit#heading=h.vjt2wnr366ew It is a simple Websocket/JSON API and we can provide enough C# code in the API Tester to get you started. Using this API you can fully automate anything at all since it allows you to subscribe to/get market data, log into your trading account, get all the info from your trading account, place/monitor trades etc. All streaming.
  2. If you can program a bit, using MT's API would allow you to do all this stuff in your own program that communicates with MT. You may also look at MT's hotkeys system (probably also using the "global variables" in the hotkeys for customized parameters).
  3. Easiest way to check - put in a counter in the scan code that increments every time alert is triggered, and put that # into the alert string as it is triggered.
  4. Arg, alerts in their notification parameters have some value that determine how long it takes for the alert to "clear" and how long to "restart". You should look at the "restart" option. If it is not "immediate" - then alert, once triggered, will not trigger again until that time elapses. If you actually are seeing alerts pop up but not show in alert log, that would be different. But I suspect what you're seeing is an alert popping up, then clearing then the alert condition being hit again but the alert not popping or logging because of the "restart" setting?
  5. Ok -- the line should be changed to: var LogValv = BarVolume[2]==0 && BarVolume[1]==0?0:Math.Log(BarVolume[1]/BarVolume[2]); because otherwise you get infinities. I also changed my code to remove such occurrences.
  6. You can have subgroups in your portfolio (use --- as a "stock symbol" for the separator row). So what you can do is have a subgroup at the top for the "flagged" stocks. Drag the symbols you want into and out of that group during the day. Industry/Sector/Float - we try to make columns for all parameters we receive from the sources. Very few sources provide that info.
  7. 1. If you have a version of paintbar where setting extended hours to Always prevent any of the matches from being shown - send it to me, tell me on what symbol to try it and I will look. 2. An easy way to see whether there were matches is to also do a TriggerAlert when the condition is satisfied (and fiddle with the alert notifications so that if it happens every second you don't get 100s of alerts). Then you can look at the Alert log.
  8. I guess I gotta respond to the whole thing: Combine historical and intraday charts somehow, it's rather difficult at the moment to look at a daily chart, map out some levels/trends and then have those same drawings on your intraday chart. Now I don't know if combining them or what not makes sense, but some way for them to be a single entity in regards to drawings. *** I do think about whether/how to do this once in a while. It is tough because even though a lot of code is shared, a lot is also specific to intra or historical. Even stuff like certain indicators only available for intraday and not historical charts, the internal structures that hold the candles, different way of drawing grids, etc. Add a new drawing tool, simple horizontal line, exactly like the line tool but without the ability to change degrees. This is purely an ease of use feature. *** Press SHIFT as you're drawing. Spike filtering fixes, right now spike filtering is super annoying, watching SPY/IWM/QQQ/TSLA or anything like that on a 5 min or premarket and you'll end up with tons of spikes that you need to manually filter, at the moment I zoom in, right click, delete lowest point, and that's rather annoying. I don't find I have this issue with other platforms of similar capability (DAS, Sterling, etc), I've tried a few different feeds and they all give me tons of spikes. I don't know if the answer is AI/MI or something, but I've played around with the spike filter settings and cannot find a perfect value to fix this issue. *** have you played with the various parameters for the spike filtering system in the general Settings? Collapse option chain by default, right now when you open up the option chain it takes forever, needs to get all the values for all the different dates. It would be better if they where collapsed by default just showing like maybe the next exp date or something similar to TOS. That would make it easier to load it up (IB takes like 30 seconds at least to load an entire option chain). *** done, also added the collapse/expand buttons in the View tab on that window. And yes IB is HORRIBLY slow with the option chains. Market replay, this is a larger feature, but it would be nice to be able to back test or market replay to practice trading. *** We have the replay almost there but other things keep crowding in front. It would be a replay for a particular symbol, though, not the whole market. Alerts on CASH or BP, so you could set an alert if you are down $200 for the day or something as a way of helping with risk management. *** you mean on trading account balances? Ability to specific an account per type, say you have IB for options, WeBull for shares, and Binance for crypto. It would be nice to be able to say, all option orders go to IB, all equity trades go to WeBull, and all crypto goes to Binance. *** that's an interesting concept... The problem here is that the trading ticket has specific features for the account with which it is associated. We'd have to think on that. A warning if you have a open position upon closing, there has been a few times I've pressed my close key and for some reason my hotkey bugs out or something and I am left with a open position, it'd be nice to get a warning saying you have a open position upon closing. *** we already have that for one of our versions. Will have Jerry dig that out and see if he can put that in MT.
  9. You can, today, utilize paintbars to do indicators that can have as an output: 1. A single line/curve 2. A band (two lines, colored in between) 3. A set of straight lines with text on them To make a full-fledged indicator editor would be hard. Mostly because indicators are written for efficiency, which adds complexity, and there is SO much stuff that can go into an indicator. Even if I do a pre-wizard to generate a lot of the code it is still complicated afterwards.
  10. 1. There is nothing in that code that detects if it is pre/postmarket. Maybe it is just that the conditions you're checking for do not occur in pre/post markets? 2. Arg, the way scans work - each iteration of the scan if SetScanResult is executed, that shows in the column. If it is NOT executed, nothing shows in the column. Which means that in your paintbar right now, if the condition is not true anymore, the scan result will blank out. Isn't that what you want?
  11. One run of a paintbar is too short to be tracked. If you use some long loops in a paintbar, in aggregate it may start slowing down the system. I will put in the IsHidden (and document it in help).
  12. dxFeed don't have a limit on simultaneous tickers right now. Backfills: for OHLC it is 120 days max (that's an MT limitation). For tick data, I set it in MT to 5 days max. You really don't need more than that and the time it takes to get tick data for any reasonably liquid stock for more than 5 days is excessive.
  13. Hiding it does not pause it at all - on purpose. For example, paintbars use hidden indicators all the time. Indicators or paintbars should not affect performance much - of course, with paintbars it very much depends on the paintbar code. It is easy to write a huge loop that would slow it down. I could maybe add an IsHidden boolean var in paintbars so when you're using advanced you could make it not fire alerts if it is hidden?
  14. Set scan result is ok - it would just show true or false. But the SetColorAndShape and TriggerAlert should probably be conditional on what scan is. That is, it should be if (scan) { SetColorAndShape... TriggerAlert... }
  15. You mean like options interest tree but showing volume instead... There are problems with that. For one, that would only show today's volume, and if a contract is bought/sold 10 times, it would show 10 even though the interest increase is at 0. Would that be indicative of anything? Another problem (internally) is that it would have to be updated all the time, meaning we would have to run quotes on every option. That's a LOT of quotes.
  16. .fctbNone{ color:#000000; } .fctbStyle4{ color:#0000ff; } .fctbStyle1{ color:#800000; } .fctbStyle3{ color:#000000; } .fctbStyle6{ color:#808080; } .fctbStyle2{ color:#008000; }// note: everything after MainCalculation is basically state keeping mechanism public void MainCalculation() { DefinePaintbarParameter("Period","Period",true, 2, 100, 1, 11); var LogVal = Math.Log(Close[1]/Close[2]); CloseLog.Add(LogVal); var SDevClose = CloseLog.GetStDev() * Math.Sqrt(Period/(Period-1D)); var m = SDevClose * Close[1]; var pricespike = (Close-Close[1])/m > 3; LogVal = BarVolume[2]==0?0:Math.Log(BarVolume[1]/BarVolume[2]); VolLog.Add(LogVal); var SDevVol = VolLog.GetStDev() * Math.Sqrt(Period/(Period-1D)); var n = SDevVol * BarVolume[1]; var volumespike = n==0?false:((BarVolume-BarVolume[1])/m > 3); var scan = pricespike && volumespike; } int Period; StateFIFOQueue CloseLog; StateFIFOQueue VolLog; /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { Period = Convert.ToInt32(GetPaintbarParameter("Period")); CloseLog = new StateFIFOQueue(Period); VolLog = new StateFIFOQueue(Period); } /// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { } /// <summary> /// Holds current PB state - use to calc PB, changes to it carry over to next PB calc /// </summary> private PaintbarState CurrentState; /// <summary> /// Holds saved PB state - internal /// </summary> private PaintbarState SavedState; /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// </summary> private void PaintbarClearState() { CurrentState = new PaintbarState(); CloseLog.ClearBoth(); VolLog.ClearBoth(); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { SavedState = CurrentState; CloseLog.SaveState(); VolLog.SaveState(); } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { CurrentState = SavedState; CloseLog.RestoreState(); VolLog.RestoreState(); }
  17. There is "All" and there is "All + Leaps".
  18. It consolidates the data on next MT startup. Takes a little while to do so sometimes (could be a few minutes even).
  19. I will make the TIF field freestyle so you can put formulas in there.
  20. Yes, no arrow is 0. I see what you mean about the overlap.. But how would you specify it. Absolute value is not a good idea since it is very symbol-specific. Neither is the % value for the same reason. What works for AMZN would not work for KNDI. Offset in pixels?
  21. If it is set to 300 and the symbols are only present in this portfolio, it should refresh every 5 min, yes. The reason why this is not done for other sources is that Yahoo is a "snapshot" source, while others are streaming sources.
  22. Please expand on this. Exactly how would this work.
×
×
  • Create New...