Jump to content
Medved Trader Forums

Mike Medved

Administrators
  • Posts

    1,543
  • Joined

  • Last visited

  • Days Won

    124

Everything posted by Mike Medved

  1. In Alert Editor - add a Trade Fill Alert and only pick Sound as a Notification.
  2. The formula for EMA is simple: 1. Mult = 2/(1+period) 2. EMA = PrevEMA+Mult*(Value-PrevEMA) So - take a set of data. Let's say 1000 points. And do EMA using the last 20, then last 40, then last 60 etc. And compare the values You can even do that in excel...
  3. If you wanted to go back a long way on a scan, you can use the SetDaysNeeded function. We try not to overdo that so that the initial backfills on scans don't take a really long time.
  4. Are you asking about charts? It goes back to the beginning of the chart. Are you asking about paintbars? For intraday, usually to the beginning of the day, unless some indicator in the paintbar requires more or you specify more by calling the SetDaysNeeded function.
  5. Someone asked for this, it is now implemented, will be in next beta. Now when you set up Trade Beads in the chart, you will be able to access its value inside a Paintbar (note - not a Scan, a Paintbar) by using the TradeBead(int BeadNum) function.
  6. Seems like Windows Defender (from other reports) decided to go nuts on the latest versions of MT. How to exclude MT from Defender: http://www.medvedtrader.com/wd
  7. Hm - it is an HTTP request. It has to receive something back... Does it expect JSON back?
  8. What error are you getting?
  9. You set Trading_AccountNumber to the account ID of the trading account defined in MT. Then all the Trading_* variables populate.
  10. Well, for time-based charts you can see how many minutes have passed since the beginning of the session.... TradingDay.SessionStart
  11. You can, in paintbar code, get the previous close and today's open point and draw a line (with the SetLine function). And, if you mean fibonacci retracements, you could draw some based on those two points with additional SetLine functions, yes.
  12. We stream ticks that come in. We don't stream the candles, but we do build the candles for the getCandles command.
  13. In general, looping in scans/paintbars is not an efficient method... You have to remember, the code in scan/paintbar is executed for each candle to start with, and then for each update subsequently. The paintbar is a state machine. So all the stuff that you do with loops can be done by, for example for your loops, keeping a counter that is increased each time the condition is met, zeroing it each time the position is not met. Have to do that with "State-keeping" code, with the counter inside the state.
  14. 1. No, intervars don't stream. You have to get it every time you want an updated value. It is very light in terms of processing, so poll it as much as you want. Make sure you figure out what intervar you want - a symbol-specific one or a "global" one. 2. No need to throttle scans. You run the scan, it initializes (possibly slowly if there are a lot of backfills) then just runs on every update. Again, unless it is written really inefficiently (like huge loops for each run) it is pretty light, so no need to just run it every X minutes. But - if you really would like to, there is code that you can put in the scan that will only run once the candle is finished. Just check the IsNewCandle variable, and if true, run the calculations on the previous candle (which at that point would be finished).
  15. Ok. Can you give me a list of variables that you need accessible. And it would be per account per symbol, right?
  16. The hotkey actually places the order. If it is a "send" it sends the order to the broker. If it is not a "send" but just a "drop" it drops the capsule on the chart. But it is a "do and forget" thing. If you send or drop another order, it will not replace the previous one, it will add one more... There is a ChangeOrder hotkey that could work, but you would still to hit the hotkey to do that and it works under certain circumstances only. Like on Chart it would change the order over which the mouse is, or if there is only one order, will change that one.
  17. You're doing this in a scan, you have the SymbolData.Symbol string variable available. Just check for SymbolData.Symbol.StartsWith(".SPY") or something. Like, if you don't want your scan to run on ANY option symbol, just put this at the very start of the scan .fctbNone{ color:#000000; } .fctbStyle5{ color:#0000ff; } .fctbStyle6{ color:#800000; } if (SymbolData.Symbol.StartsWith(".SPY")) return;
  18. The "Possible security violation" is there for a reason. We don't want paintbars/scans to write to files. Basically because if someone gave you a scan and you ran it and you didn't go through the code with a comb, it could do malicious stuff to your computer...
  19. Mike Medved

    Raw Data

    Means the data you see comes from an OHLC backfill (not from a running feed or from a tick backfill). OHLC backfill in MT means - MT received one minute OHLC data and split it into 4 pseudo-ticks, - O H L and C spread across that minute's time period.
  20. You can execute two or more orders in one hotkey... Each one independent of the other?
  21. I have a full plate in front of me right now. Please drop me an email in a week or so pointing to this thread to remind me of it.
  22. First, you have an OTA order with 2 different quantities in the legs. I am pretty sure we don't allow for it. Second - your "triggered" order has Pos as the quantity. You probably think that the Pos includes the amount that was bought on the first leg. But the Pos is taken from the account positions *at the time* of the hotkey execution.
  23. Well. As long as it's consistent, it's good for your purposes...
×
×
  • Create New...