Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,542
  • Joined

  • Last visited

  • Days Won

    124

Everything posted by Mike Medved

  1. 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?
  2. 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.
  3. 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.
  4. 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.
  5. 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
  6. 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)
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. Is the Timeframe on the historical chart set correctly to the timeframe of the chart's symbol?
  12. Show me the code you're using. Should be something like this (if it's a paintbar) if (High == SymbolData.High) { SetColor(Green); } or use SetScanResult for a scan.
  13. SymbolData.High and SymbolData.Low is high or low of the day. The first 5 minute high/low is something that you would need to calculate yourself - basically make the variables in the advanced code (outside the functions) that would hold the high/low, then in the code check if current timestamp is within first five minutes of the session and set the high/lows accordingly... If that is not clear I could post some code here for you.
  14. They did. We will look into it and fix.
  15. There isn't a direct way (I am not sure - in IB can you drag a symbol?) If you can somehow get a text of a list of symbols, either comma- or space-separated, then in MT you can just hit INS on a portfolio and paste that text in.
  16. Oh I just love stuff like that.
  17. I am sorry this fell through the cracks. Can you point us to a cite somewhere online describing these coloring/hollowing rules?
  18. I never exposed that data to the scripts, mostly because not all data sources supply it and when/if they do, it is often not that accurate...
  19. Try removing "Wilder's Smoothing" in parameters.
  20. Yes, I just checked and it works as it should.
  21. I will take a look. Thought it was already possible to do it.
  22. You're right. Was a bug. Thanks for the report. Fixed, will be in next beta.
  23. Can you post a screenshot here (or email us)? When I do Single Reg Channel, it gets cut off on the right as it should.
  24. Can you put a snapshot here showing the problem with the price charts?
×
×
  • Create New...