Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Content Count

    576
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by Mike Medved

  1. Mike Medved

    Suggestions for videos...

    As you may know, we do have a Youtube channel: https://www.youtube.com/channel/UCD9KD0V7T62Y29i1YYw9-jQ I'd like to entertain suggestions on the videos you think should be added to it. Ranging from beginners' to experts', but with emphasis on beginners, since experts usually take care of themselves
  2. Yes, that's correct. There is really no other way to do that, since the indicators are set up and calculated prior to any scan/paintbar code being executed.
  3. I don't know what you mean by doesn't have this as a feature when code is produced. If you are talking about Advanced mode, In the Param column if you click on it, it shows the bid only/ask only param and remembers it if you set it, no? It may not show it in that column, but that's because it is not shown on the chart legend either (the chart legend is what is shown in the column).
  4. They raised it since then.
  5. Mike Medved

    Slow Stochastics

    https://www.investopedia.com/ask/answers/05/062405.asp That's a good resource. Some traders find that this indicator is too responsive to price changes, which ultimately leads to being taken out of positions prematurely. To solve this problem, the slow stochastic was invented by applying a three-period moving average to the %K of the fast calculation. Taking a three-period moving average of the fast stochastic's %K has proved to be an effective way to increase the quality of transaction signals; it also reduces the number of false crossovers. After the first moving average is applied to the fast stochastic's %K, an additional three-period moving average is then applied - making what is known as the slow stochastic's %D. Close inspection will reveal that the %K of the slow stochastic is the same as the %D (signal line) on the fast stochastic.
  6. Jason, all that stuff can be done using the advanced code with tracking session-variables as we did in other examples on this forum before. You can look at session info, any time you get new session, record the price as "open" (for both the core symbol and compare-to symbol), then for all subsequent values you can get percentage from open as (Close-SessionOpen)*100/SessionOpen, and compare them. Same with session high/lows - we discussed this before.
  7. Mike Medved

    52 week high on historical charts

    I know right? But out of almost 7.5 billion of people on the planet so relatively few know that!
  8. Mike Medved

    52 week high on historical charts

    Ok it will be in next beta (Jerry will email you to get the pre-beta install so you could try it now).
  9. Mike Medved

    52 week high on historical charts

    Like this (it's 252 because there are 252 trading days a year)?
  10. Mike Medved

    52 week high on historical charts

    Ok so - indicator that would take a period, and would track a rolling high and low of the period - would suffice?
  11. Mike Medved

    52 week high on historical charts

    I guess I could make a rolling 52 week high indicator. Wouldn't be a horizontal line. Or you could do it with a paintbar if you wanted. Do you know enough about advanced paintbars to try?
  12. Mike Medved

    Broker/MT VWAP discrepancies...

    Live data feed is usually tick-data or close to it.
  13. Mike Medved

    Broker/MT VWAP discrepancies...

    VWAP is a tick indicator - that is, it is calculated from tick data, not from candle data. So, if your chart is backfilled with OHLC data, its VWAP calculation will not exactly match someone else's calculation that uses true tick data. Especially if you specify the minimum trade size (which for OHLC would almost always be satisfied, vs tick data).
  14. Ok, the problem is that the line if (Timestamp <= SessionInformation.SessionStart.AddMinutes(5)) should be if (Timestamp < SessionInformation.SessionStart.AddMinutes(5))
  15. "CrossUp" means previous candle's EMA is lower than the current candle's high and the current candle's EMA is higher than the high. Is that what you meant to do? If you remove the "crossUp" - do you see a stretch in the chart where the paintbar's condition is satisfied? If there is, and you add the CrossUp, and the CrossUp condition is within that stretch, it should work.
  16. A few things. First, I am not sure if you mean to compare the highs for exact match. That is unlikely to happen. Maybe you mean the high is higher than the first candle high? Second, I don't know if you really want to check for the "crosses up" condition. It is very unlikely that the candle that matches the first candle high will cross the EMA as well. You probably mean if Close is above the EMA? And third - your code will only register the first five minutes' high if you use five-minute candles. If you use one-minute candles, you'd have to change the code. Do you only use this on five-min candles?
  17. Mike Medved

    Bid/Ask Size

    Changes in size are way too chaotic/frequent. You'd have to save it on every tick, not on every candle - and that's a lot of data. You know how you have a FIFOQueue? I recently added a TimedQueue. Instead of saving N values, it stores N seconds' worth of values - each value (internally) has a timestamp and it gets removed as it goes out of the time scope. As it is now, you don't get to set the timestamp of the value, it gets set to the current system time at the time you're adding it. This would allow you to store let's say 60 seconds minutes worth of bid/ask sizes and be able to analyze them. Note that unlike FIFOQueue, you would not need to save/restore it as a state variable. Just keep adding the new values to it.
  18. Mike Medved

    IB ES data , gaps on volume charts

    Backfilled data that IB provides is not tick. It is OHLC 1 min, and MT represents it by splitting it into 4 "ticks" - O, H, L and C ticks. Because of that, the representation of data as a volume chart with the candle volume that is on the order of 1 minute volume is not accurate. If you try something like 10,000 contracts, it would be better.
  19. Sure - you can calculate the high yourself instead of using the SymbolData.High. You're already checking the high of the first five minutes, so it is similar code. 1. Use Advanced mode. 2. In CurrentState, define int LastDayNumber; Float DayHigh; 3. in PaintbarClearState, set LastDayNumber to -1 4. var SessionInformation = GetTradingSessionInfo(Timestamp); if (SessionInformation.DayNumber != LastDayNumber) { CurrentState.LastDayNumber = SessionInformation.DayNumber; CurrentState.DayHigh=High; } CurrentState.DayHigh = Math.Max(CurrentState.DayHigh, High); if (High == CurrentState.DayHigh) { ..... } Note: this will trigger at any time the high is the same as the daily high SO FAR in the session.
  20. Mike Medved

    New BETA - OPTION Risk Analysis !!!

    You can change all kinds of parameters on that screen. You can change the buy/sell price of the options and underlying (just double-click on the cell in the table), you can change quantities (again, double click), add more lines at different values of either volatility or dates, etc. We tried to make it as interactive as possible. See https://www.medvedtrader.com/trader/WebHelp/option_risk_analysis.htm
  21. Ok, it is a bit of a glitch, but - the SymbolData values are stored as Double in MT, and the Candle values are stored as Float (because they take half the space). So I would suggest doing if (Math.Abs(High-SymbolData.High)<0.00001)
  22. SymbolData.High is the current High for the current day that is shown on your portfolio. All the SymbolData variables refer to the current, latest, received data. Not to anything on the chart.
  23. The # of the day is important because you can compare it to another day #. That is, if one (previous) call got you let's say 7 and now the call on current candle got you 8, that means this is a new day. The session is derived from the timestamp that you pass it - that is, it is the session inside which the timestamp fits.
  24. double CurrentState.FirstCandleHigh; - should be double FirstCandleHigh; It is a Double variable inside a PaintbarState struct. also var CurrentState.FirstCandleHigh = 0.00; - should not have var - var is a declaration, and it is already declared.
  25. ok you cannot have private struct PaintbarState { var FirstCandleHigh; } FirstCandleHigh has to be Double. You can only use var when you're assigning a value to it that is unambiguously of some type. Other than that, sometimes you are referring to FirstCandleHigh instead of CurrentState.FirstCandleHigh - needs to be the second one.
×