Jump to content
Medved Trader Forums

ahujat

Members
  • Posts

    171
  • Joined

  • Last visited

Everything posted by ahujat

  1. Well, the intention, when it was implemented, was based on users' needs at that time. The needs are not static. I am guessing Paintbar was never intended to have custom PnL calculations too or the new features added later were never intended when first implemented.
  2. I am using Paintbar to do custom PnL calculations but that is lost once MT is restarted. If I remember correctly, there was a discussion regarding saving the data to a file outside of MT but was considered a security risk. But MT can provide some space for that data to be stored internally which can be retrieved after restart?
  3. I was specifically referring to Mike's code above, which he provided as an example and is quite simplistic. I wanted something similar but a little more nuanced. But I figured it out, so it's all good.
  4. What I meant to ask was that there is a one-day delay before I get the correct data. If I start the application today, it won't have the data for yesterday, and then get the correct data the next day. Let's say MT is restarted the next day or the system crashes, I don't MT will retain the highs/lows from today, and then there will be a day delay. Moreover, even if MT retains the data over restarts, if MT is restarted after five days, the Prev11amLow/high will be wrong because it will be 5 days old. No? Basically, what I want is that if I start MT today, I want yesterday's data to be available today or if I restart after 5 days, the Prev11amLow/High should be 4 days from now. Any way to do that taking into account partial days and holidays?
  5. Hi Mike Will this work across system reboot and MT restart or even system crash/hang (where I have to forcibly reboot the system without closing MT)? I also need something like this, high/low for a particular time range from the previous trading session.
  6. Received the following email suggesting that other applications may have integrated the new Schwab API
  7. I have two scanners running in a single scanner code, on intraday data. On one of the scans, scanner condition might happen multiple times, and the scanner sets and clears the scanner column in the portfolio based on when the condition is met and then maybe on the second bar the condition is unmet and then it clears the scan column. On the second scan, if the condition is met once, the alert remains visible through the day. As an example, my scan looks for the bar closing below Previous day's low (Just an example but the real scan is a more than that) 1. In the first scan, it should set the scan column but when if the next or later bar closes above Previous day's low, it should unset the scan column. 2. In the second scan, whenever a bar close below the previous day's low, it should set the scan column but even if the next or later bar closes above the previous day's low, scan column should still be set. Basically, in this case, the scanner code has to remember the scan condition is met and then ignore further movements. I am able to do the first scan but can't figure out the second one. Is there an example for that? Or some simple code that I can incorporate into my scanner code?
  8. Something is seriously wrong. So, I had 4 lots of 1000*multiplier open. On the chart I put in a limit order to close the position. It instead shorted 4 5000*multiplier lots. I got lucky that I caught it in time, otherwise could have been a disaster. In TWS, if I put in a limit order on either of the two contracts, it shows up on the same chart symbol.
  9. pretty weird. Yesterday it was showing up as SILU23. After a restart today, it shows up as @SIU23:*1000 and quotes for that are working fine.
  10. Enter Si, select futures, At the bottom left of the popup window, select multiplier 1000 When you buy it, it shows up as SILU23 in the portfolio window in MT.
  11. IB symbol is @SIL but the quotes don't show up with that symbol (@SILU3 for September expiry). 5000 multiplier works fine.
  12. I am seeing an issue with Partial fills. I believe when a partial fill happens, The Trade_LastFillQty returns the number of shares in that particular order and not the partial fill. This happens rarely, so difficult issue to debug. Can you please check if that's the case?
  13. There seems to be some issue with Coinbase. Paintbar gets the correct values for Trading_Pos and Trading_PosPaid but Trading_LastFillQty and Trading_lastFillPrice are always 0. Works totally fine with Tradier.
  14. Ok. Found the issue. I was using the last trade (Horizontal Line 'Last') in the paintbar. Paintbar gets updated when the next trade happens, which causes a lag depending on when the next trade happens. Changed it to Bid/Ask and it gets updated immediately.
  15. Cool. Thank you. How does the Trading_LastFillPrice and Trading_LastFillQty work? I am not sure if they are auto updated whenever a trade happens. I had to Hide the Paintbar indicator and then show the indicator for it to update.
  16. The delays happened yesterday and day before yesterday. It worked fine before that and today too, there wasn't any delay. Must be something on their end, I guess.
  17. Lately, there has been quite a bit of delay getting the trade confirmation with the Tradier brokerage. I have the website open simultaneously and the confirmation on the website seems to be fine.
  18. The PC is set for automatic sync but I guess, Windows doesn't do it everyday. Last sync was a week ago, enough time to cause a clock drift. Not sure if it's done weekly or even longer. But found a way to do it every day automatically.
  19. I am guessing the bar countdown time clock is different than the bar close time clock. Check out what happens when the bar countdown reaches 0. and then the new bar countdown timer starts in the following video. https://drive.google.com/file/d/1pNeIMFlXDIlndL2EvoSX0WTuHyFADz-o/view?usp=sharing The PC clock is ahead by 7.8 seconds as per time.is
  20. Hmm, will make a list of the variables needed but just wondering if each variable requires a special handling for it be supported (in the paintbar)? Yes, per account per symbol.
  21. Mike, I sent you the reminder email last week. Any plans to support this?
  22. Any Update on this. Meanwhile, can the P&L calculation be based on Midpoint of Bid/Ask rather than Last? In Options, in some cases, the difference between last and Midpoint can be quite a bit. Also, I believe IB does the calculations based on Midpoint of Bid/Ask rather than last.
  23. Even Hotkeys default to the Account selected in that window and if you need to change the account, you can specify it explicitly. Same Hotkey can exist in multiple types of windows (Level II, Trade Ticket, etc.) while the Paintbar is tied to a specific chart window, where it's enabled. I guess it can default to the account selected in the that window. No?
×
×
  • Create New...