Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,542
  • Joined

  • Last visited

  • Days Won

    124

Everything posted by Mike Medved

  1. Mike Medved

    Paste API

    It is for people who use something like AutoKey and prefer to use its paste feature. It allows you, instead of sending WSAPI commands over the websocket, instead paste (as in ctrl-V) the command into a window. The doc is the same as WSAPIs. Just the method of delivery is different.
  2. I ran that code all by itself and it is showing the volumes in the scan. Can you send me to support@medvedtrader.com the whole scan - maybe somehow something in the scan is preventing showing the BarVolume.
  3. 1. If you set the right X coordinate to something like 99999, it will always be flush right. 2. The X parameter can be a timestamp. So you can do TradingDay.SessionStart I guess.
  4. Well, we have several color levels but anything past the last one is the same color.
  5. If you place the order USING the hotkey, you can place another order (or 10 other orders) in the same hotkey.
  6. Couple of questions: 1. What exactly do those numbers represent. 2. in Ninja, how far back can you go with those candles? 3. What happens when you zoom out and candles become very narrow?
  7. We have something that is somewhat similar - it is the "VBP candles" - that shows you the volume at each price point - on the left for the first half of the candle and on the right for the second half. That is what I have seen to be called called "Footprint Profile" There are other kinds of "Footprints". Can you point to the one you're talking about?
  8. I added that. It is basically multiplying the two numbers that are shown in the capsule itself.
  9. 1. Did you hit "Start" on the scanner? 2. I put in the TriggerAlert call in the code. For scanning, put in SetScanResult call.
  10. In the code below, the part that is important is MainCalculation and the definition of the PaintbarState structure. The rest is automatically generated. .fctbNone{ color:#000000; } .fctbStyle4{ color:#0000ff; } .fctbStyle3{ color:#000000; } .fctbStyle2{ color:#008000; } .fctbStyle1{ color:#800000; } .fctbStyle6{ color:#808080; }------------------------------------------------------------------------------------------------ .fctbNone{ color:#000000; } .fctbStyle6{ color:#808080; } .fctbStyle2{ color:#008000; } .fctbStyle4{ color:#0000ff; } .fctbStyle3{ color:#000000; } .fctbStyle1{ color:#800000; }/// <summary> /// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc /// </summary> private struct PaintbarState { public int LastDayNum; public double CumulativeVolume; public double LastDailyHigh; } public void MainCalculation() { if (TradingDay.DayNumber != CurrentState.LastDayNum) { CurrentState.LastDayNum = TradingDay.DayNumber; CurrentState.CumulativeVolume = 0; CurrentState.LastDailyHigh = 0; } CurrentState.CumulativeVolume += BarVolume; if (High > CurrentState.LastDailyHigh) { CurrentState.LastDailyHigh = High; if (CurrentState.CumulativeVolume > 300000) { // trigger alert TriggerAlert("High", "New Daily High!"); } } } /// <summary> /// INITIALIZES paintbar. Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// NOTE: do NOT initialize the CurrentState here - the PaintbarClearState will be called AFTER this call, and will wipe it out. /// </summary> private void PaintbarInitialize() { } /// <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 /// and initialize whatever variables you place into it. This is called AFTER PaintbarInitialize /// </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; }
  11. If you're ok with detecting "hit the high of the day" - whether the high changed or not - then this will do If you specifically want to detect "hit NEW high of the day" then you'd need to do it with "Advanced" paintbar. Tell me if that is what you want and I will post it here.
  12. Hm. Could it be that you have synced crosshairs on those charts?
  13. Yes - except there is a "Crosshair Link group" - it looks like the "Symbol Link group" button but with a crosshair on it. And it works across charts, raw data and historical data windows.
  14. We do not let any orders initiate "automatically". For various reasons. But you can have a hotkey that sells *when you press it* if candle closed below an EMA.
  15. There may be several methods but try this one: 1. Set some price alert on a stock - in Alert editor. 2. Place "Price Alerts" indicator on the charts in question. 3. You can drag the alert lines - that will get reflected on all charts of that symbol.
  16. There is a mechanism of interaction between hotkeys and charts that will allow you to use any indicator or in general any computed value from the chart in a hotkey. That’s the ChartVar and InterVar (look it up in the MT help file) The flow is as follows: 1. You make a paintbar that sets an InterVar or a ChartVar (with a SetInterVar or a SetChartVar function in the paintbar). (Or you can even do the SetInterVar inside a scan). 2. You place that paintbar on the chart from which you will be executing the hotkey (or if it is in a scan, run the scan) 3. Inside the hotkey, you can reference that InterVar or ChartVar by calling the intervar or chartvar in the hotkey for the particular parameter (like the limit price). So – for EMA(9) for example, you would have a paintbar that uses EMA(9), calls it let’s say EMA9 inside its code, then calls SetInterVar(“EMA9”, EMA9); // this will set the intervar “EMA9” for this symbol, to be used in the hotkey Inside the hotkey, in the Limit parameter for example, you would use intervar(‘EMA9’)-0.2 or something like that. That way the value that is set in the paintbar would be passed to the hotkey. Of course, the value that is passed can be a result of some complex calculation in the paintbar, not necessarily just an indicator value.
  17. This is an Excel thing - the "OK" is the response MT sends. Excel insists on popping it up the way you're doing it. Am not an expert in Excel but I think, when you insert the URL as a Hyperlink in your excel cell, you need to make it "Place in this Document" and point it to some out of the way cell.
  18. BTW for clarity, I would define a var fBill = 1000000000D; then do stuff like 50*fBill instead of 50000000000
  19. It's interesting that it is showing X but not in the editor. I am seeing huge integers in your code, bigger than an int should be. Try putting a D after it - like this: 1000000000000000D
  20. Try parentheses. (not acquire) and (not alert) and (not analysis)
  21. No, we fixed it And yes, it's great. And it's ours. No one else has it. At least that I know of.
  22. Found the problem. Has been fixed. Will be in next. Glad someone using the interest trees Didn't know how many people would.
×
×
  • Create New...