Jump to content
Medved Trader Forums

Jason

Members
  • Posts

    208
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Jason

  1. Is there any way to customize the balances shown to include the Equity With Loan value and Initial Margin? The problem is that there are times when I want to take a position in a stock that has non-standard margin requirements or my Equity With Loan value isn't high enough to enter and this can change per symbol. I am using Interactive Brokers and would like to make these other account balances visible in the Level II window.

     

  2. Wow, thank you! The fact that I found the similar quote tool under View/Options in my charts I think led me to believe there should have been options for the candle data in similar chart sub menus. And the description in Charts/General isn't obviously connected to that tool in my mind. Obviously I once knew how to set it up as it was set to Always Show in all my charts from way back but kind of freaked out when I turned it off and couldn't remember how to restore it.

  3. Okay seem to be having an unusual problem. I was playing around with the settings on my charts and while in View/Options I accidentally turned off the tooltip that I had set up showing the OHLC and volume of each candle when hovering . This was small, black and white and translucent. I had it anchored in one place on each chart. After I closed it it's now gone from ALL of my charts. I tried turning on "Show Hover Price Tooltip" from the General Charts settings but that tooltip is locked to my cursor which is pretty obnoxious and it still does not show OHLC of the candles I'm hovering over.

    When I go back to View/Options on a chart and choose to Show Quotes I'm in the same boat. The tooltip can't be configured to show data for the candles I'm hovering over.

    For what it's worth, I hadn't changed any Application Settings prior to fiddling with the chart I was looking at. I even tried reloading the layout I had saved in the past when the tooltip was working and it's still gone.

  4. In a paintbar I'm creating I would like to draw a Risk/Reward tool on the chart the way I would if manually selecting Draw - Risk/Reward from the ribbon at the top of a chart. I wanted to know if there was any way to do this and set the values for the tool like the entry, target, stop etc. This would be very valuable as an indicator AND could also be used to act as a record of a trade taken based upon the setup as drawn. A part of the analysis of my results involves recording an image of a chart with the setup taken. Among other things, this allows me to see what the intended plan was vs. how the trade played out. The paintbar could also use this as an indicator highlighting trade setups according to the criteria/rules of my method.

    I have tried sort of replicating the drawing of the tool with SetLine and related functions but the results were extremely ugly and kludgy. Of course, I can't properly emulate the bubble display of the entry, target and stop values and how they scale as displayed when drawing the tool manually outside of the paintbar. It would be infinitely easier if I could some how just access the drawing tool parameters functionally, in code.

    Is there some way we could be provided with the C# code for the Risk/Reward tool used internally within MT that we could then use in our paintbar?

  5. As it stands, it's impossible to use anchored VWAP for intraday opportunities, we can't set up more than 1 anchored VWAP without MT changing the date we specified and we can't set one up in a chart without it being displayed for every symbol loaded in that chart.

    Surely you don't mean that these deficiencies are intentional? Maybe there is a special reason why the user has to be required to set the indicator up by manually typing the date in but I can't see how these behaviors could be anything other than bugs.

    I just don't see the point of making available a tool like this if the way it operates in the software renders it useless. Now maybe I'm just an idiot and can't figure it out and there's a way to get it to work as expected but if after testing and struggling with it I, as a user, need a lot of assistance or special instruction to get the tool to perform as expected then generally speaking that's your first clue that something, somewhere, has gone awry.

  6. I have noticed that after applying two anchored VWAPs to a historical chart and restarting the program the date for one of them is switched to match the other. It's very difficult to set up multiple anchored VWAPs and keep the dates straight for a symbol. As mentioned elsewhere there is also the problem of the anchored VWAP set up in a chart for one symbol being displayed for any other symbol loaded in that chart. So in order to use this someone would have to remember each candle of interest for each symbol they want displayed and manually correct the dates in the interface for each anchored VWAP and perform this process every time a symbol is loaded OR the program is started. This renders the anchored VWAP pretty useless in MT.

    It can be EXTREMELY powerful to gauge at which price points large blocks of market participants, by volume, are going to be in or out of the money and to what extent. Especially for swing trading. This can also be very relevant to intraday trading and I'd like to see this functionality added. Large events, FOMC meetings and market reports, large volume changes near highs/lows of the day that mark trend changes and knowing the VWAP since those points can be far, far more important than simply knowing the VWAP from the open.

    As far as the interface is concerned there are lots of opportunities there as well. What I would like to see is this kind of implementation... User clicks Show Ribbon, clicks Draw, clicks an icon for Anchored VWAP, then clicks the candle on the chart from which point forward it will be displayed. This would be far more intuitive and would eliminate the hassle of the current implementation.

    I realize that I've included some changes here that aren't specifically bugs so let me know if you want me to re-post those under feature requests.

  7. Wanted to update here to say that this indeed has solved the problem for me. It's a roundabout way of obtaining the candle frequency but does the job.

    Now, if there were just a way to SET the frequency for a specific chart through the API. It's not critical for me but would be very nice. My use case would be that when my software sends an order to enter a position it could then set the symbol for the main chart AND change the frequency to the one in use when the setup was defined and the hotkey used.

  8. That is taking the place of ARR in the portfolio. It appears to be an Interactive Brokers bond identification number. It also appears that ARR went bye-bye. Can't even pull a chart from the IB website and don't immediately see any news that would explain what's happened. But I wonder if it may have something to do with maintenance that IB is performing as it usually does on Saturday.

  9. Okay, I've tried closing MT again and restarting both the IB connection and MT and can no longer reproduce the issue. Can't explain this. I know it's possible to get a very rare and benign exception error but reported this after I was able to reproduce it earlier. Nothing had changed regarding the connection on IB Gateway either. Status was green across all IB connections both now and when I was able to reproduce the error earlier.

  10. Okay, didn't think of this before posting but I tried disconnecting from IB Gateway, closing MT and reloading it. Everything reloaded fine. Subsequently reconnecting to IB with MT already loaded didn't seem to present any problems with functionality but when I tried shutting down MT while still connected to IB and reloading MT again received the same error. It hadn't occurred to me that the IB connection could be spawning the error.

     

    Will send log.

     

  11. Just went to load MT with the charts in the layout preloaded with symbols from yesterday's session and received this error. Have never seen this before and didn't do any system or software updates between runs. If I select Ignore the program is unusable. Tried system shutdown/restart and received the same error. Also encountered the same problem when loading a fresh instance of my layout. The message I receive from MT is:

    Medved Trader encountered an Error

    Symbol cannot be null or empty
    Parameter name: sym

    Please contact Medved Trader technical support and provide the error details

    AppVer: 1.1.9930.100 Err.Flags: Log, ShowIndicator, ShowToUser
    System.ArgumentNullException:
       at MT.MTSymbol..ctor(String symbol) in [ROOT]\MTShared\MTSymbol.cs:line 82
       at MT.Trading.TradePositionsUC._populateRows(List`1 symbolList, Nullable`1 newSubtotalPosition) in [ROOT]\MT\Trading\TradePositionsUC.cs:line 1098

     

    I will attempt to attach an image of the windows error dialog.

     

    2023-09-30_assert.thumb.jpg.94b69673bd511eb0ce3d99e9418b9d26.jpg

  12. Thanks for adding this!

    Just wanted to post a follow-up regarding this in case anyone else wants to implement it... The idea behind being able to specify an OrderRef indentifier was to provide me with an easy way to identify all transactions associated with a trade through the API and to also have this reflected in trade confirmations/flex query reports on IB's end. I can report that this functionality does not work properly. After some testing I discovered that this is a problem with IB. Specifying the OrderRef through the API works great and that same OrderRef value is properly returned in transaction updates but when running reports on the IB site the OrderRef value is not provided. I had no reason to expect their reports to be borked like this but I've confirmed with IB that it's an issue that their system is actually set up by default to not display the OrderRef values in reports (for some heretofore undiscoverable reason). The feedback I received is that they have received a number of requests about it and are (considering) working to fix it. Not holding my breath but at least having the option to use it in the API effectively offers us the same benefit.

  13. I've been thinking about this and believe there are a number of possible solutions. If I could pass a command through to the API that would retrieve a list of open windows or the window information for the window(s) which all share a particular linked symbol color that could allow me access to the necessary information. That may also open up opportunities in the future if there were ever any plans to expand the API to provide higher resolution control over MT.

    I am not at the point where it's necessary for me to resolve this as I have a lot of other work that needs to be done but I also believe that I could work up my own solution to pull the window handle if necessary.

  14. I mean frequency. In my workflow I would use a hotkey which would then launch a script. The job of the script is to look at the candles that form as they are created and place trades if the price action does one thing or another. My decision to use the hotkey is dependent upon a setup or the trading environment I see on the chart (maybe with 2m candles or maybe I'm looking at a 5m candle chart). The script cannot do its job as intended if it doesn't know the frequency of the candles displayed on that main chart at the time I use the hotkey. A setup for a trade that I can see on the 2m chart would not be apparent, or valid, on the 5m chart, for example.

    As I understand its functioning, the problem with using APIKeyPressUpdate is that I would need to use a hotkey specified in the MT settings for sending the window data and THEN follow that using a separate hotkey to initiate the process described above in my software. The problems are 1) I would then have to use two separate hotkeys to achieve the same outcome, 2) I would have to be very careful to make sure that the main chart window in question has focus at the moment I need to get everything started or bad things could happen (NOT easy to guarantee that the proper window has focus), 3) as far as I could see when I checked it out the candle frequency is not returned by APIKeyPressUpdate. Although I may be wrong about 3.. One complication is that, as far as I can tell, if in my software I set up and register a global hotkey that hotkey cannot be the same one I set up in MT to trigger the APIKeyPressUpdate.

    One interesting thing I noticed is that in MT Dashboard I can see a complete list of ALL MT windows currently open along with their corresponding window titles. If I could retrieve that list in the API that would almost be enough of what I need. The missing piece is the ability to identify the correct window throughout the trading session. The main chart window I use is always the same window for each trade I place throughout the day. In original incarnation of my software I would use a function in my script to locate the correct window (by searching for a window with the same height and width of the main one) and extract the internal window handle used by Windows. Each script managing a trade would then be able to operate with impunity knowing the correct candle frequency would be used. I'm just not sure of a way to produce the same outcome with the API.

  15. In developing a C# version of the software I use for trading I'm not able to duplicate one of it's abilities. In the software I'm able to use a hotkey that launches a script that monitors price action and pulls candle data but to do this it needs to retrieve the period of the main chart I use. This is necessary as sometimes I will want to place a trade on a setup on the 5m chart or maybe the 2m chart, etc.

    Is there any way through the API that the code I write can retrieve the period of a specific chart at the time I use the hotkey to begin monitoring for certain conditions? This chart is always the same window even though I have many different charts open while trading..5m charts, 2m, 15m, 30m charts etc.. I suppose it would be possible to report the period of a chart through the APIKeyPressUpdate but the challenge there is that it's difficult for me to ensure that I've always got the one window in focus when I use the hotkey to send the window data. I considered that it might be possible to use a hotkey that would both send the window data AND run my software but I'm not sure how that would work as I'm registering global hotkeys to run the software which I believe would take control of them away from MT.

    In the original version of my software I would use a script to identify the window handle of the window in question and then through text manipulation of its title pull the chart period.

  16. Oh yes I'm using C#. Initially I was attracted to using separate connections but I do think that just having a single connection is most likely not going to create any bottlenecks. Eventually will need to be able to monitor as many as 16 trades simultaneously each one monitoring the last price traded for order placement. And it's not like having a single connection would prevent it from being multithreaded anyway.

  17. Got it. Though I'm having quite a bit of difficulty getting a separate connection set up. I can make a connection through a separate function called by a new thread but it's not obvious to me how to separate the responses received from commands sent over the connection by that thread from those intended for the main thread. This use case seems a little outside of what the APITeser program was designed to accommodate and I wasn't sure how to proceed. So without messing with the mulithreading part just yet I tried creating a separate object of type WebSocketConnection and duplicating the relevant functions for sending/receiving data so that they reference that new connection name instead of MainSocket. I assumed there was an easier way but the idea was to create a proof-of-concept that would allow me to play with sending and receiving commands through two separate connections. The result was absolutely no response from the server through the 2nd connection and no errors or crashes to speak of.

    Can you point me in a better direction?

  18. Thanks, just the kind of heads up I was needing. I had anticipated there might be some roadblocks of that sort if I tried this approach especially since I don't exactly know how websockets will behave.

    Okay, when you refer to updates do you mean specifically the streaming quotes and trade position updates? Currently, my understanding is that if I create a thread with its own socket connection which will manage a specific trade then any command sent from that thread would receive a specific response sent back to only that thread via that threads connection. If my thinking about this is correct, I'm looking at dedicating a single thread to receive quotes/updates as you suggest and then taking actions (placing trades, maybe requesting historical candle data for the symbol, etc.) from within the threads managing the trades.

    The endgame will be to have alerts triggered off of paintbars sent to the corresponding thread managing a trade which will then trigger actions. Which sounds pretty complex considering the framework I'm looking at but I'll cross that bridge when I come to it. Will definitely have to read up on using dictionaries and semaphores etc. All the multi-threading and Windows Forms GUI stuff is the steepest part of the learning curve for me at this point. On the whole though, it's been surprisingly easy adapting to a C# environment.

×
×
  • Create New...