Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,543
  • Joined

  • Last visited

  • Days Won

    124

Posts posted by Mike Medved

  1. I tried this:

    1. I ran TSLA, in a portfolio, collected data for like 5 min. Then went to raw data window, highlighted those 5 minutes, pressed ctrl-C, pasted it into Notepad.

    2. Went to chart of TSLA. Cleared data. Backfilled it with Tick data. Went to raw data window, highlighted the same 5 minutes, copied, pasted it into another Notepad

    3. Compared the two raw data lists. For me, they were mostly the same (with a one tick discrepancy here and there)...

    What would happen if you did the same?

    Also - dxFeed seems to NOT ignore odd lots when building candles for its OHLC backfills. So - do check the "include odd lots" setting in MT.

  2. 2 hours ago, Adventures In .NET said:

    It's good to hear you replicated it and have a fix. I wonder which package you have that hid the problem.

    It's just some confusion with a combo of subs that caused the dxFeed streamer in MT decide to get the Q-suffixed backfill for the stock (meaning Nasdaq only) instead of the full one.

    • Like 1
  3. I tried running with several of my logins with dxFeed and there is no discrepancy between backfill and collected volumes. I emailed them asking them for a login that matches your subscriptions...

  4. I will dedicate some time to this on Mon... If it's the case that the L1 feed of DXFeed produces candles with different volumes than the DXFeed backfill, will report it to them...

    As a reference, what kind of subscription bundle do you have with DXFeed?

  5. Ok so - are the volumes after 13:07 (that is, the volumes gathered from L1 data by MT) correct but backfill volumes aren't?

    If you clear data at that point and re-backfill will the volumes after 13:07 become a lot smaller?

  6. I would suggest looking at the Volume indicator on both charts (since VWAP is very sensitive to that). For example, TradingView: the volume is different from MT's volume, so the VWAP is not the same:

    image.png

  7. While optimizing the recalculation of new candles on dynamic updates of charts for OTHER chart types, I screwed up the recalc of the VbP candles.

    That was a while ago too :) You're the first one to notice it. Which means that not many people use them. Too bad - they are nifty.

    Fixed it. Jerry will put it up.

  8. Sure. Instead of PosPaid there, do this:

    Pos>0?PosPaid+0.02:PosPaid-0.02

    or it will also take

    IF Pos>0 THEN PosPaid+0.02 ELSE PosPaid-0.02

     

    inline conditionals are pretty handy. They can also be stacked - for example if you have no position, you want the price to be Bid? Then you do

    Pos>0?PosPaid+0.02:Pos<0?PosPaid-0.02:0

  9. Yes, that means it's running on 1-min candles, just like having a 1-minute chart and putting that paintbar on it.

    As for your question. No, the scan's indicator parameter is not # of minutes, but # of candles...

    You can twiddle this a bit. You can have two scans, running on two portfolios (with the same symbols in both portfolios). One scan you would run on 5-min candles, get the KC indicator and store the value in the SetInterVar function. This first scan would not trigger any scan result. In the other scan, you would use GetInterVar to receive that value, and use it as the KC value.

     

  10. On 1/8/2024 at 6:49 PM, 3acor said:

    the code wouldn't work. I would like to divide the volume by the difference between the current timestamp and the timestamp of the current 15min candle open.

    That's what (Timestamp.Minute % 15)+1  gives you. Stick this into a column in a scan and watch it go from 1 to 15 then roll over to 1... Just make sure the scan is run on 15 min candles.

  11. 18 hours ago, 3acor said:

    How can I get the difference between the current timestamp and the timestamp of the candle Open and use it in an equation?

    Example: I am using the scanner on the 15min frequency and currently the time is 10:41am. How can I get the difference of 11min which is the Current Timestamp minus the timestamp of the candle Open?

    (Timestamp.Minute % 15)+1 ?  1 for 1st minute. 2 for second minute. etc.

  12. For that you'd have to keep track of the average yourself. Use StateFIFOQueue of the appropriate size (period), zero it out whenever the new regular session starts (use TradingDay variable - the DayNumber in it changes when the new session starts, and you can figure out if you're in premarket or not as well) and add the candle's volume if regular session. Then take its average.

    • Like 1
  13. On 12/22/2023 at 5:09 AM, Thebattlefront said:

    Mike, So i understand that queue[3] = 2 should work now, but is it also possible to do queue[3]= queue[3] + 2? So I can make a cumulative sum inside only one of its cells.

    Also, can i do lets say,

    queue[5] = queue[4] / queue[2] or

    queue[5] = queue[4] * queue[2]

    Is division and multiplication allowed like that? And also, can i do math operations like

    queue[10] = Math.Round(queue[4] / queue[2], 2);

    Yes, all of those are possible.

×
×
  • Create New...