Jump to content
Medved Trader Forums

Arg

Members
  • Posts

    172
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Arg

  1. Hi, I have a simple script that I used elsewhere to find a spike in price/volume. I would like to use it here but need some assistance. There are two parts, first one for a spike in price, second part for a spike in volume. Both are identical in form. The final condition for the scan is to have true results for both the price and volume condition. The pseudocode is below. The ''def'' keyword is used to define a variable or a constant, and also a condition. c is the current price of the stock (not a 'closed' price - despite the name). c[1] is the closing value (price) of the last completed bar. c[2] is the closing value of the bar before c[1]. Same thing with volume v, v[1], v[2], v[3] etc. The stdev(closeLog, 11) calculates the standard deviation of 11 values of closeLog. So (if my understanding is correct) first value will be log(c[1] / c[2]), second value will be log(c[2] / c[3]), etc up to the final 11th value, which will be log(c[11] / c[12]). Any suggestions or help converting to a format suitable for the advanced scanner would be appreciated. ---------------------------------------------------------- def length = 11; def c = close; def closeLog = log(c[1] / c[2]); def SDevClose = stdev(closeLog, length) * sqrt(length / (length-1)); def m = SDevClose * c[1]; def pricespike = (c - c[1]) / m > 3; def v = volume; def volumeLog = log(v[1] / v[2]); def SDevVol = stdev(volumeLog, length) * sqrt(length / (length-1)); def n = SDevVol * v[1]; def volumespike = (v - v[1]) / n > 3; scan = pricespike and volumespike; -------------------------------------------------------------
  2. I opened up MT and get a whole lot of portfolio alert notifications - with the trigger time being many minutes (eg 10 minutes) previously. Is there a way to avoid this so that alerts will only be triggered from the present time onwards?
  3. BarVolume doesn't return the volume. What am I doing wrong? Also, this is for a portfolio, not a chart. So what time period is used for the bar? Can I specify this?
  4. It would be useful to see the recent volume (and to be able to sort by this). Is there a way to include a column with the volume for the last completed bar (eg 1 min)?
  5. Could this be possible? Eg I would like to add a volume condition to various alerts as a lot of alerts are triggered when volume is low - and hence any significant move is unlikely.
  6. If I set the both the chart and tradeticket windows to GTC+Ext and then click on a ticker in the portfolio, the chart tif stays the same but the tradeticket tif changes to DAY.
  7. If I change the TIF on my chart it will remain the same even if I change the ticker. But if I change the TIF on the tradeticket then it will revert back to the default after I change the ticker. I would like the tradeticket to behave the same as the chart in this regard. I am using TDA.
  8. Is this possible? The help mentions conditional orders with 2 or more legs but I think 3 legs is the max - so just a single bracket OTOCA, right?
  9. Yes, that was it. The Account window was appearing on another monitor so I hadn't noticed it. Thanks
  10. Yes, the hotkey can be executed on tradeticket. But why does the tradeticket window become deactivated? I press the buy button on the tradeticket window - and don't click anywhere else, so I would expect the tradeticket window to still be active. Something seems to be deactivating it.
  11. I bought using the trade ticket buy button. The order is filled and I can see the change in gain on the chart. If I then press my sell hotkey nothing happens. If I mouse click on the trade ticket window then the hotkey will work. It seems as if the window becomes deactivated after clicking the buy button. Is there a way around this?
  12. Log file sent. The broker is TDA. The completed order was filled - I could see the capsule with the changing gain value. Thanks
  13. I have a problem with the hotkey pasted below. I buy 50 shares using the trade ticket - bracket order. The completed order appears on the charts. Then I click on the tick chart and press the sell hotkey below. The quantity in the tick chart is 100 shares. I get a message saying that my position will be oversold/bought. No sell is made. I then press the same hotkey again and it sells 50 shares. What is going on here? Where is there an overbought/oversold message? And why does the hotkey work on the second click?
  14. I can see why this is useful but I would like the option not to have the quantity box (eg in chart trading / trading ticket / etc) default to current position. Is it possible to set a default share size that will remain the same regardless of any existing quantities?
  15. If I hold down shift then the cross-hairs disappear completely. What would be nice would be to toggle easily between "Freestyle" and "Snap to Candles" modes.
  16. The chart has crosshairs which snap to the close of a candle. This is a nice feature but it would also be nice to have the ability to quickly toggle so that the cross hairs are centered exactly at the mouse cursor.
  17. P/L can be seen on chart with the capsule when chart trading. But can a P/L text box be an option regardless of how the trade was initiated, eg trade ticket / level 2 etc. Could be a text box on chart - or a stand alone text box. I know the P/L is available in Account but it's hard to see if there are many open tickers.
  18. Has anything changed? Yesterday I couldn't see the BRKT option on chart trading (TDA account with advanced options activated). Now I can....
  19. Arg

    Chart edge question

    Ok, I reread the instructions - it works ok now
  20. Arg

    Chart edge question

    This is with current day and 5 bar padding. But clearly there seem to be many more padded bars.
  21. Arg

    Chart edge question

    For the 1m chart: There is a large gap between the current candle and the Y-axis. If I slide the X-slider all the way to the right then no candles will be in view.
×
×
  • Create New...