Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by Mike Medved

  1. .fctbNone{ color:#000000; } .fctbStyle5{ color:#0000ff; } .fctbStyle3{ color:#ff00ff; } .fctbStyle1{ color:#a52a2a; } .fctbStyle6{ color:#808080; } .fctbStyle2{ color:#008000; } .fctbStyle4{ color:#000000;font-weight:bold;text-decoration:underline; }int DayNumber = -1; public void MainCalculation() { if (TradingDay.DayNumber != DayNumber) { CurrentState.AHVol = 0; CurrentState.RegVol = 0; DayNumber = TradingDay.DayNumber; } if (TradingDay.IsAfterHours) CurrentState.AHVol += BarVolume; else CurrentState.RegVol += BarVolume; SetColor("Line Color", SysColor.MainIndicator1); SetYValue(CurrentState.RegVol==0?0:CurrentState.AHVol*100/CurrentState.RegVol); } /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { CurrentState.AHVol = 0; CurrentState.RegVol = 0; } /// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { public double AHVol; public double RegVol; } /// <summary> /// Holds current PB state - use to calc PB, changes to it carry over to next PB calc /// </summary> private PaintbarState CurrentState; /// <summary> /// Holds saved PB state - internal /// </summary> private PaintbarState SavedState; /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// </summary> private void PaintbarClearState() { CurrentState = new PaintbarState(); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { SavedState = CurrentState; } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { CurrentState = SavedState; } In fact you can use the same paintbar as a scan - just set the SetScanResult as well as the SetYValue. Isn't MedvedTrader fun?
  2. You can make a paintbar that would plot the % of after hour volume compared to regular hour volume. It would not show you a # but it would show a line with a scale.
  3. We have an API. It's a streaming websocket/JSON API, you connect to running MT and can get market data, trade, set up alerts, get notified when alerts fire, etc. https://docs.google.com/document/d/15IvYQEYzSeftTSEdVhsptAguM0fGm9mTJFSDDAK7zWE ... which reminds me I gotta finish prettying the doc up.
  4. When you delete symbols from a portfolio, the feed should stop (unless there is another portfolio that has the symbol, of if there is a chart up for the symbol and "Active Chart Subscription" option is checked in settings). The easy way to check is to bring up a raw data window for the symbol. That window is passive, it does not actively subscribe to the symbol, so you can see if data is coming in from some window by seeing if the raw data window updates.
  5. Well if you're doing > that's not CrossesUp, that's just >. And yes, if you use index of 1 it will check the candle before the last one, so that way you will be checking after the close of the candle.
  6. We didnt change anything on that recently. We'll ask TDA people about it.
  7. Interesting. Does the description "lag" the symbol or is it completely random?
  8. Ok I repeated it. Will go look what's up. Fixed will be in next beta.
  9. Note that TimestampEnd is the timestamp of the last tick in the candle. So for timed candles it may not be 1 min (or 5 min etc) after the candle start. It may be 30 sec or something. Depending on the ticks that go into the candle.
  10. Where do you modify the price of the alert - in the alert editor?
  11. Added: TimestampEnd indexed variable - like Timestamp. Will be in next beta.
  12. Looked at your files, don't see anything... There is a condition in MT where if you draw too fast (that is click move and release within a fraction of a second) it won't draw but that's not what is happening is it?
  13. So - other than the current time - what do you need? When you look at a renko bar, there is a start time and an end time. You want to know the end time for the bar?
  14. DateTime.UtcNow I think is what you're looking for. But that of course is current UTC time, so it would only work for the last candle processing, not for going back.
  15. Ah Completely misunderstood your request. No, not storing it. Will see.
  16. Doug - right click on any column header in the portfolio. Pick "Column Chooser" from the menu that pops up. In there - Scan Date.
  17. Thanks for the report Doug. Will be fixed in next beta - the order of the buttons will be preserved, per window.
  18. I changed the way it is done. It was looking at the one-min projected volume rather than the actual one-min volume. On liquid stocks it is basically same but if the trades come in 5-10 seconds apart, it may make a difference. Will be in next beta.
  19. Hm - the whole point of hotkeys is you hit the key and magic! something happens. What you propose would not be like that... I will think about this.
  20. I will check on that. Saw it a while ago meant to do that forgot.
  21. Added option "Align Candles on Hour" to Settings / Charts / Display. Default is true, but if you uncheck it, it will do what you want. Will be in next beta.
  22. Are you sure you don't have Period in that hotkey? I just tried this: And it just switches frequency... Ok i see it. If NoChange, it is not really NoChange If the period is NOT THERE it works as it should. Will fix. For now just remove the Period.
  23. This is for a historical chart, right? .fctbNone{ color:#000000; } .fctbStyle8{ color:#000000; } .fctbStyle5{ color:#0000ff; } .fctbStyle7{ color:#800000; } .fctbStyle6{ color:#808080; } .fctbStyle2{ color:#008000; }StateFIFOQueue Highs; Double AllTimeHigh = 0; public void MainCalculation() { AllTimeHigh = Math.Max(AllTimeHigh,High); Highs.Add(High); Double H,L; Highs.GetHighLow(out H, out L); SetColor("Line Color", Color.Green); if (H == AllTimeHigh) SetYValue(H); else SetYValue(YSkipValue); } /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { Highs = new StateFIFOQueue(90); } /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// </summary> private void PaintbarClearState() { Highs.Clear(); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { Highs.SaveState(); } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { Highs.RestoreState(); }
×
×
  • Create New...